home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / editor / wed501.zip / WEDMAN.DOC < prev   
Text File  |  1992-01-20  |  116KB  |  2,295 lines

  1.  
  2.  
  3.  
  4.  
  5.                              The WED  Manual for
  6.  
  7.                              WED(r) Version 5.00
  8.         
  9.           Copyright 1992 by Mason Washington and EdTech Associates Inc.
  10.                               All rights reserved.
  11.         
  12.           WED is a registered trademark of Washington Computer Company 
  13.                     and is licensed to EdTech Associates Inc.
  14.         
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32. ----------------------------------------------------------------
  33.         WED Manual Table of Contents
  34. ----------------------------------------------------------------
  35.         1          Introduction
  36.         1.1        Program Description
  37.         1.2        Machine Requirements
  38.         1.3        Installing WED
  39.         2.         Getting Started
  40.         2.1        Starting WED
  41.         2.3        The Command Line
  42.         2.4        The Status Line
  43.         2.5        The Text Window
  44.         2.6        The Help Command
  45.         2.7        Using WED's Pop-up Menus
  46.         2.8        The Quit Command
  47.         2.7.1      Save edit file
  48.         2.7.2      Keep and exit WED
  49.         2.7.3      Write and continue
  50.         2.7.4      Abandon file
  51.         3          Moving Around the File
  52.         3.1        Moving Around the Screen
  53.         3.1.1      The Arrow Keys
  54.         3.1.2      The Home and End Keys
  55.         3.1.3      The Right Word and Left Word Commands
  56.         3.1.4      The Next Space Command
  57.         3.2        The Scroll Commands
  58.         3.3        Up Screen and Down Screen
  59.         3.4        Repeat Factors
  60.         3.5.1      Goto Top
  61.         3.5.2      Goto Bottom
  62.         3.5.3      Goto Line Number
  63.         3.5.4      Goto Pointer
  64.         4          Changing the File
  65.         4.1        Entering Text
  66.         4.2        Inserting Text
  67.         4.3        Erasing Text
  68.         4.4        Locating and Replacing Text
  69.         4.4.1      Locate and Replace Options
  70.         4.4.1.1    Occurrences
  71.         4.4.1.2    Backwards Option
  72.         4.4.1.3    Whole Words Option
  73.         4.4.1.4    Ignore Case Option
  74.         4.4.1.5    No Query Option
  75.         4.4.1.6    Global Option
  76.         5          Advanced Commands
  77.         5.1        Setting Pointers
  78.         5.2        Moving Text
  79.         5.3        Copying Text
  80.         5.4        Zapping Text
  81.         5.5        Undeleting Text
  82.                    Appending Text from Other Files
  83.         5.7        Writing Text to Another File
  84.         5.8        Editing Multiple Files
  85.         5.8.1      Opening Other Files
  86.         5.8.2      Switching Between Files
  87.  
  88. ----------------------------------------------------------------
  89.         WED Manual Table of Contents
  90. ----------------------------------------------------------------
  91.         5.8.3      Quitting Other Files
  92.         5.8.4      The Zoom Command
  93.         5.8.5      Resizing Windows
  94.         5.9        Copying Text Between Files
  95.         5.10       The DOS Command
  96.         6          Editing with Word-Wrap
  97.         6.1        Word-Wrap Mode
  98.         7          Special Features for Programmers
  99.         7.1        Auto-Indent Mode
  100.         7.2        Re-Indenting with Format
  101.         7.3        The Execute User Program Command
  102.         7.4        The Pop-up ASCII Table
  103.         8          Editing Special Characters
  104.         8.1        Editing Files with Control Characters
  105.         8.2        Using Text or Graphics Characters
  106.         10         The Setup Command
  107.         10.1       Cursor Type
  108.         10.2       End-Of-Line Symbol
  109.         10.3       Locate Key Keep
  110.         10.4       User Programs
  111.         10.5       Keyboard Macros
  112.         10.6       Split Screen
  113.         10.7       Insert Type
  114.         10.8       <del> Key
  115.         10.9       Make BAK Files
  116.         10.10      File Name Keep
  117.         10.11      Swap Path
  118.         10.12      Monitor Type
  119.         10.13      Colors
  120.         10.14      EGA 43 Line Mode
  121.         10.15      Snow Removal
  122.         10.16      Auto Indent
  123.         10.17      Word Wrap
  124.         10.18      Right Margin
  125.         10.19      Tab Conversion
  126.         10.20      Tab Stops
  127.         10.21      Print Header
  128.         10.22      Print Line Numbers
  129.         10.23      Printer Page Height
  130.         10.24      Printer Page Width
  131.         10.25      Printer Top Margin
  132.         10.26      Printer Bottom Margin
  133.         10.27      Printer Left Margin
  134.         10.28      Printer Right Margin
  135.         10.29      Printer Setup String
  136.         10.30      Printer Reset String
  137.         10.31      Save Setup Values
  138.  
  139.  
  140.  
  141.  
  142. 1    Introduction
  143.  
  144. 1.1  Program Description
  145. WED is a fast and easy to use screen oriented text editor designed for
  146. programming and light word processing. Being screen oriented means WED
  147. continually displays a region of the file on the screen and allows the user to
  148. change the file by making changes on the screen. The screen is changed by
  149. moving the cursor to any place in the file and then typing new text or using
  150. any of the advanced edit functions available.
  151.  
  152. WED is easy to learn and work with features like pop-up menus, context
  153. sensitive help, and a convenient prompt line that lists the commands while
  154. leaving most of the screen available for editing. WED's Undelete command even
  155. makes it easy to undo mistakes.
  156.  
  157. With the powerful commands available in WED it is possible to search and
  158. replace text and move or copy blocks of text within a single file or between
  159. separate files. The extensive file handling allows multiple files to be
  160. edited, split and merged, and includes the ability to split the screen and
  161. view two files at the same time. It is possible to switch to the DOS prompt
  162. without leaving the editor by using The DOS gateway command.
  163.  
  164. Other advanced features are designed to aid the programmer. The auto-indent
  165. feature and the indent and undent commands save key strokes while entering and
  166. editing programs. The execute command may be used to compile programs without
  167. exiting the editor, thus eliminating wasted time spent switching between the
  168. editor and the compiler. WED also provides a pop-up ASCII table with decimal,
  169. hexadecimal, and other display formats.
  170.  
  171. WED is fast, utilizing all available memory to speed editing operations and
  172. supports file swapping to allow editing of very large files.
  173.  
  174. WED supports an extensive setup command that will change the parameters that
  175. control the way the editor operates. The setup may be changed at any time
  176. during an edit session and saved for later edit sessions.
  177.  
  178. The file printing command can be used to print text files and source code
  179. listings. Options such as page headers, page numbering, time stamping, line
  180. numbering and margin sizes offer a wide variety of listing formats.
  181.  
  182. In addition, WED works well with the dBase III system. It can be set up as the
  183. default editor and/or word processor using the TEDIT and WP keywords in a
  184. CONFIG.DB file.
  185.  
  186.  
  187. 1.2  Machine Requirements
  188. The  WED  editor  will  run  on  IBM PC's and compatibles  having  at  least  one  disk  drive
  189. (floppy or hard disk) and 256K RAM. Since the editor is compact, it leaves
  190. plenty of room for other files on a single floppy system. WED also works well
  191.  
  192.  
  193.  
  194. on hard disk systems; since the main editor is a single executable file with
  195. no overlays, it can be placed in a default directory and accessed via the DOS
  196. path command.
  197.  
  198. WED will display on either monochrome or color monitors. For color monitors
  199. use the setup command to select the colors that the editor will use during
  200. edit sessions.
  201.  
  202.  
  203. 1.3  Installing WED
  204. WED should include the following files:
  205.  
  206. WED_READ.ME          A short text file that should be read before using the
  207.                     editor.
  208.  
  209. WEDMAN.DOC           This document.
  210.  
  211. WED.EXE              The WED text editor program.
  212.  
  213. WED.CFG              This file contains WED configuration settings that are
  214.                     maintained with the Setup command.
  215.  
  216. WED.HLP              This file contains the text used by the help command.
  217.  
  218. Before installing WED make a backup of the original WED diskette, one that
  219. will function as a "master working disk". To do this requires creating a
  220. formatted bootable diskette. Place a blank diskette in drive B and enter the
  221. following DOS command:
  222.  
  223. A>FORMAT/S B:<Enter>
  224.  
  225. When format is complete, move the newly formatted diskette to drive A, and
  226. place the WED master diskette in drive B. Now copy all of the WED files to the
  227. new diskette with the following DOS command:
  228.  
  229. A>COPY B:*.* A:<Enter>
  230.  
  231. After DOS has finished copying the files remove the WED master diskette and
  232. put it away in a safe place. Always use the backup copy as the principal
  233. working diskette when using WED. This ensures having an extra copy of WED if
  234. the working diskette is damaged or lost.
  235.  
  236. If installing for a floppy based computer, the installation is complete. Skip
  237. over the rest of this section.
  238.  
  239. If installing onto a hard disk copy WED to a subdirectory on the hard disk.
  240. First create a new subdirectory. Move to the root directory and issue the
  241. following command:
  242.  
  243.  
  244.  
  245. C\>MKDIR WED<Enter>
  246.  
  247. This will create a subdirectory call WED. Now move into the new subdirectory
  248. with the command:
  249.  
  250. C\>CD WED<Enter>
  251.  
  252. Now place the new WED working diskette in drive A and copy the files onto the
  253. hard disk:
  254.  
  255. C\WED>COPY A:*.* C:<Enter>
  256.  
  257. When using DOS version 3.00 or latter, WED can be accessed via the path
  258. command. WED will automatically be able to find its support files, WED.CFG and
  259. WED.HLP.
  260.  
  261. When using a version of DOS older than 3.00 set an environment variable so
  262. that WED can find its support files. To do this, add the following line to the
  263. AUTOEXEC.BAT file:
  264.  
  265. SET WED=C:\WEDDIR
  266.  
  267. where "WEDDIR" is the directory in which WED was copied.
  268.  
  269. If there is limited disk space on the hard drive or are using WED from floppy
  270. disk, copy the three files: WED.EXE, WED.CFG, and WED.HLP. These three files
  271. are the only files needed to run the WED editor. All of the other files that
  272. come with WED are documentation files and do not need to be on the disk when
  273. running WED.
  274.  
  275. The final step is to print out a copy of this manual. The manual is formatted
  276. for 8 1/2 by 11 inch paper. The printer should be set to a print density of
  277. ten CPI (characters per inch) and to a print height of six lines per inch.
  278. Make sure the printer is on-line and positioned at the top of a new page. Then
  279. use the DOS print command to print the manual:
  280.  
  281. C\>PRINT WEDUSER.DOC<Enter>
  282.  
  283.  
  284.  
  285. 2.   Getting Started
  286.  
  287. 2.1  Starting WED
  288. Starting  the  WED  editor  is  easy.  Enter  "WED"  from  the  DOS  prompt.  Remember  to
  289. complete the entry by pressing the <Enter> key. WED will begin the session by
  290. displaying the main menu. From the main menu it is possible to edit a file,
  291. print a file or modify WED configuration values.
  292.  
  293. To begin editing a file without passing through the main menu type the name of
  294. the file to edit after "WED" on the command line:
  295.  
  296. C\>WED TEST.TXT<Enter>
  297.  
  298. In this example, WED will move directly to the edit mode with the file,
  299. "TEST.TXT."  If necessary, a drive and/or path may be included with the file
  300. name.
  301.  
  302.  
  303. 2.2 The Main Menu
  304. The  WED  main  menu,  shown in figure 2-1, provides access to  the  three  main  functional
  305. areas of WED, editing, printing and setup:
  306.  
  307.  
  308. ┌──────────────────────────────────────────────────────────────────┐
  309. │ ╔══════════════════════════════════════════════════════════════╗ │
  310. │ ║                  WED (r) Text Editor,  V 5.00                ║ │
  311. │ ║           Copyright 1987 - 1991, Mason Washington            ║ │
  312. │ ║              Licensed to EdTech Associates Inc.              ║ │
  313. │ ║                                                              ║ │
  314. │ ║ -*-*-* Shareware Version,  For 30 Day Evaluation Only *-*-*- ║ │
  315. │ ╚══════════════════════════════════════════════════════════════╝ │
  316. │                                                                  │
  317. │                                                                  │
  318. │                       1. Edit a file                             │
  319. │                                                                  │
  320. │                       2. Print a file                            │
  321. │                                                                  │
  322. │                       3. WED setup menu                          │
  323. │                                                                  │
  324. │                       4. WED Ordering Info                       │
  325. │                                                                  │
  326. │                       5. Help                                    │
  327. │                                                                  │
  328. │                       6. Exit WED                                │
  329. │                                                                  │
  330. └──────────────────────────────────────────────────────────────────┘
  331. Figure 2-1
  332.  
  333.  
  334.  
  335. To  make  a  selection  use  the <Up> and  <Down>  cursor  keys  to  move  the
  336. highlighted bar to the desired option and then press the <Enter> key.
  337.  
  338. The  first  option,  "Edit a file," is the WED text editing  system.  If  this
  339. option  is  selected WED will display a listing of the files  in  the  current
  340. directory  and then prompt for the name of the file to be edited. If the  file
  341. name entered does not exist, WED will create a new file.
  342.  
  343. The second option, "Print a file," is a function for printing text files  with
  344. various  formatting  options. This function can be used to print  source  code
  345. listings as well as document listings. The print file function is described in
  346. detail in chapter nine.
  347.  
  348. The  third  option,  "WED  setup menu," provides access  to  the  various  WED
  349. configuration  variables.  This function may be used to change  colors,  enter
  350. keyboard  macros or modify any of the setup parameters. The setup function  is
  351. described in detail in chapter ten.
  352.  
  353. The  fourth option, "WED ordering info," displays information on how to  order
  354. registered copies of WED.
  355.  
  356. The fifth option, "Help," displays a help screen which describes the main menu
  357. options.
  358.  
  359. The  last  option, "Exit WED," causes WED to terminate and return  control  to
  360. DOS.
  361.  
  362.  
  363. 2.3  The Command Line
  364. The top line of the edit screen is reserved for the command line. In the main
  365. edit command mode the command line appears as shown in figure 2-2.
  366.  
  367. ┌────────────────────────────────────────────────────────────────────────────────┐
  368. │WED: Write Append Format Other Bridge Dos eXecute Text (Y)ascii Setup Next      │
  369. │Line:     1  Col:  12     Insert                        Size:    7K Free:  227K │
  370. │══════════════════════════════════╡ manual.c ╞══════════════════════════════════│
  371. │/*  MANUAL.C   09/17/88  --  converts WED master file to either disk  */«       │
  372. └────────────────────────────────────────────────────────────────────────────────┘
  373. Figure 2-2
  374.  
  375. The command line provides a quick reference of the WED commands. To execute
  376. one of the commands, hold down the Alt key (located to the left of the space
  377. bar) and type the first letter of the command. For example, to execute the
  378. Move command, hold down the Alt key and type M. We call this combination of
  379. keys Alt keys. In this example the move key would be denoted as Alt M.
  380.  
  381. Because WED has more commands than can fit on one line, the Next command has
  382. been provided. This command displays the rest of the commands. Type Alt-N and
  383. WED will display the additional commands.
  384.  
  385.  
  386.  
  387.  
  388.  
  389. 2.4  The Status Line
  390. The  status  line  is  the second line on the main edit  screen.  It  provides  useful  information
  391. about the current edit session. Below in figure 2-3 is an example of a typical
  392. status line:
  393.  
  394. ┌────────────────────────────────────────────────────────────────────────────────┐
  395. │WED: Write Append Format Other Bridge Dos eXecute Text (Y)ascii Setup Next      │
  396. │Line:     2  Col:   11    Insert                        Size:    7K Free:  227K │
  397. │══════════════════════════════════╡ manual.c ╞══════════════════════════════════│
  398. │/*  MANUAL.C   09/17/88  --  converts WED master file to either disk  */«       │
  399. │/*                           manual, or laser file                    */«       │
  400. └────────────────────────────────────────────────────────────────────────────────┘
  401. Figure 2-3
  402.  
  403. On the left side of the line, WED displays the current line and column at
  404. which the cursor is positioned. The next entry shows the current Insert mode
  405. state (overwrite or insert). To the right of the Insert mode indicator is a
  406. space reserved for the graphics mode indicator. When the graphics mode is on
  407. WED displays "Graphics" in this space.
  408.  
  409. The last two entries provide information about the size of the current edit
  410. file and the amount of free space remaining in the main edit buffer. These
  411. values are shown in kilobytes (1024 characters).
  412.  
  413. Just below the status line, there is a double line which separates the command
  414. and status lines from the main text window. Notice that the name of the
  415. current edit file is displayed in the center of this line.
  416.  
  417.  
  418. 2.5  The Text Window
  419. All  of  the space below the status lines is used to display the file text. This area is  called  the
  420. text window because it acts like a window into the file. It continuously
  421. displays the region of the file being edited.
  422.  
  423. The text window will always contain the edit cursor which is displayed as a
  424. blinking block or underline. The cursor indicates the current edit position in
  425. the file. Any text entered will be placed in the file at the current cursor
  426. location and most commands executed will start from the cursor location. WED
  427. provides many commands for moving the cursor around the file including
  428. commands for moving the cursor to the next character, word, or line, or back
  429. to the previous character, word or line. These commands are described in
  430. detail in chapter 3. As the cursor moves through the file WED will adjust the
  431. text window so that it always displays the file region surrounding the cursor
  432. location.
  433.  
  434. WED is designed to operate in the standard PC video mode in which the screen
  435. can display eighty columns per line. This is wide enough for most text files,
  436.  
  437.  
  438.  
  439. but occasionally it is necessary to edit a file with lines longer than eighty
  440. columns. WED handles these cases with a feature call horizontal scrolling
  441. which is the ability to scroll (move) the text sideways as the cursor moves
  442. past the side of the screen. With horizontal scrolling WED can edit files with
  443. lines as long as 32,000 columns.
  444.  
  445. At the end of each line WED will display a special end of line character that
  446. looks like two left facing arrows. This character indicates the presence of
  447. the standard text line terminating sequence, a carriage return followed by a
  448. line feed character.
  449.  
  450.  
  451. 2.6  The Help Command
  452. One  of  the  first  commands that should be learned is the  Help  command.  This  command
  453. provides a convenient on-line reference guide to the WED text editor. Help
  454. screens can be displayed for any command. Just type Alt-H and WED will display
  455. the help menu as shown in figure 2-4.
  456.  
  457. ┌────────────────────────────────────────────────────────────────────────────────┐
  458. │WED: Write Append Format Other Bridge Dos eXecute Text (Y)ascii Setup Next      │
  459. │Line:     4  Col:    3    Insert                        Size:    7K Free:  227K │
  460. │═══════════════════════════╔═════════════════╡ WED HELP ╞═════════════════╗═════│
  461. │/*  MANUAL.C   09/17/88  --║ cursor     Erase      Move       Setup       ║     │
  462. │/*                         ║ quick      Format     Next       Text        ║     │
  463. │«                          ║ Append     Goto       Other      Undelete    ║     │
  464. │#include <stdio.h>«        ║ Bridge     Help       Pointer    Write       ║     │
  465. │#include <malloc.h>«       ║ Copy       Insert     Quit       eXecute     ║     │
  466. │#include <string.h>«       ║ DOS        Locate     Replace    Zap         ║     │
  467. │#include <ctype.h>«        ║                                              ║     │
  468. │«                          ║ Use cursor keys to move, <Enter> to select   ║     │
  469. │#define LF '\x0A'«         ╚════════════╡ <Esc> to exit Help ╞════════════╝     │
  470. │#define CR '\x0D'«                                                              │
  471. └────────────────────────────────────────────────────────────────────────────────┘
  472. Figure 2-4
  473.  
  474. Now use the cursor keys to move to the desired help topic and then press
  475. <Enter> to view the selected help screen. After reading the help screen press
  476. <space> to return to the help menu. Other help topics may be selected or press
  477. <Esc> to return to the main edit mode.
  478.  
  479. The Help command reads the instruction text from a file called WED.HLP. Before
  480. using the Help command, make sure that the help file is available and that WED
  481. knows were it is. Refer to section 1.3 for directions on setting up the help
  482. file. If the help file is not setup correctly and the Help command is invoked,
  483. WED will display an error message.
  484.  
  485. 2.7  Using WED's Pop-up Menus
  486. Many  of  WED's  editing  commands  communicate  via  pop-up  menus.  These  menus  are
  487. usually displayed in the upper right corner of the screen and contain a list
  488.  
  489.  
  490.  
  491. of possible options. To select one of the options use the <Up> and <Dn> cursor
  492. keys to move the highlighted menu bar to the desired option and then press the
  493. <Enter> key. Type the first letter of the desired option and WED will
  494. immediately select that option.
  495.  
  496. All of WED's pop-up menus have the ability to display help screens that
  497. describe the options and their functions in detail. To access a menus help
  498. screen either select the "Help" option or type alt-H (hold down the <Alt> key
  499. and press the "H" key at the same time).
  500.  
  501. All of the pop-up menus may be aborted by pressing the <Esc> key. When a menu
  502. is aborted, WED exits that menu without performing any actions.
  503.  
  504.  
  505. 2.8  The Quit Command
  506. After editing of the file is complete, type Alt-Q to invoke the quit command. The screen  will
  507. appear as shown in figure 2-5. This command provides functions for saving and
  508. quitting the current file.
  509.  
  510. ┌────────────────────────────────────────────────────────────────────────────────┐
  511. │WED: Write Append Format Other Bridge Dos eXecute Text (Y)ascii Setup Next      │
  512. │Line:     4  Col:    3    Insert                        Size:    7K Free:  227K │
  513. │══════════════════════════════════╡ manual.c ╞═══╔══════╡ QUIT ╞══════╗═════════│
  514. │/*  MANUAL.C   09/17/88  --  converts WED master ║ Save edit file     ║/«       │
  515. │/*                           manual, or laser fil║ Keep and exit WED  ║/«       │
  516. │«                                                ║ Write and continue ║         │
  517. │#include <stdio.h>«                              ║ Abandon file       ║         │
  518. │#include <malloc.h>«                             ║ Help               ║         │
  519. │#include <string.h>«                             ╚══════╡ <Esc> ╞═════╝         │
  520. │#include <ctype.h>«                                                             │
  521. └────────────────────────────────────────────────────────────────────────────────┘
  522. Figure 2-5
  523.  
  524. When WED saves a file it first renames the original  copy of that file
  525. to .BAK, and then saves the new version of the file. For example, when saving
  526. the file DEMO.PAS, WED will first rename the original to DEMO.BAK and then
  527. will save the newly edited version as DEMO.PAS. To suspend the automatic
  528. backup feature use the Setup command.
  529.  
  530. Sometimes when WED is saving a new or revised file, it is possible to
  531. encounter a full disk or other disk problem. If this occurs, WED will display
  532. an error message describing the problem and then prompt as follows:
  533.  
  534. Enter file to write to:
  535.  
  536. Now enter a new file name to write the revised file to. This name can include
  537. a new drive and/or path.
  538.  
  539. The quit command has several options described below.
  540.  
  541.  
  542.  
  543.  
  544. 2.7.1 Save edit file
  545. The Save option is the most commonly used Quit option. Type S from the quit
  546. menu and WED will save the current file and then exit to the main menu. If
  547. more than one file is being edited (with the Other file command), WED will
  548. exit the current file and switch to one of the other files.
  549.  
  550.  
  551. 2.7.2 Keep and exit WED
  552. The Keep option is similar to the Save option except that it exits to DOS
  553. instead of the main menu after saving the edit file.
  554.  
  555.  
  556. 2.7.3 Write and continue
  557. The Write option will save the current edit file without ending that edit
  558. session. When Write is selected, WED saves the current edit file and then
  559. continues the edit session. This option is convenient for periodically saving
  560. the changes to disk during a long edit session.
  561.  
  562.  
  563. 2.7.4 Abandon file
  564. The abandon option exits the current file without saving the file to disk. Any
  565. changes made during the current edit session will be lost. This option is
  566. useful when trying after a serious error has been made during the edit
  567. session.
  568.  
  569.  
  570.  
  571. 3    Moving Around the File
  572.  
  573. 3.1  Moving Around the Screen
  574. WED  moves  the  cursor around the file by character, word, line or page  very  easily.  WED
  575. can even move the cursor to the beginning or end of a file with a few
  576. keystrokes.
  577.  
  578. Moving with cursor control commands does not affect the text. The cursor
  579. simply moves through words without changing them.
  580.  
  581.  
  582. 3.1.1 The Arrow Keys
  583. The WED editor provides many commands for moving the cursor around the screen.
  584. The most often used are the arrow keys on the numeric keypad at the right of
  585. the keyboard. The left and right arrow keys move the cursor one character to
  586. the left and right respectively. Notice that when the cursor attempts to move
  587. right past the end of the line it is moved to the first character of the next
  588. line. Conversely, if the cursor attempts to move left past the first column of
  589. the line it will move up to the last character on the line above.
  590.  
  591. An easier way to move the cursor up or down one line is using the up and down
  592. arrow keys. The up arrow key moves the cursor up one line. If possible, WED
  593. will move the cursor to the same column in the above line. If the line above
  594. does not extend out to the current column the cursor will be placed on the
  595. last character of that line. The down arrow key performs just like the up key,
  596. but in the opposite direction.
  597.  
  598. The <Enter> that performs similarly to the down cursor key. Pressing the
  599. <Enter> key moves the cursor to the first character of the next line.
  600.  
  601.  
  602. 3.1.2 The Home and End Keys
  603. There are more keys that provide for convenient movement of the cursor.
  604. Pressing the Home key moves the cursor to the first character on the current
  605. line. Pressing the End key moves the cursor to the last character of the line.
  606.  
  607.  
  608. 3.1.3 The Right Word and Left Word Commands
  609. The Right Word and Left Word commands are similar to the right and left arrow
  610. keys, only they work in increments of words instead of characters. To use
  611. these commands, hold down the control key while pressing either the right or
  612. left cursor key. Typing ctrl-<right arrow> moves the cursor to the first
  613. character of the next word in the file and typing ctrl-<left arrow> moves the
  614. cursor to the first character of the previous word (next word to the left) in
  615. the file.
  616.  
  617.  
  618. 3.1.4 The Next Space Command
  619. The Next Space command is similar to the Right Word command. Press the tab key
  620.  
  621.  
  622.  
  623. and WED will move the cursor to the next space or carriage return character in
  624. the file.
  625.  
  626.  
  627. 3.2  The Scroll Commands
  628. There   are  two  types  of  scrolling  in  the  WED  editor:  vertical  scrolling  and   horizontal
  629. scrolling. With vertical scrolling the entire text window is moved up or down
  630. a line at a time. WED automatically performs vertical scrolling when the
  631. cursor attempts to move past the top or the bottom edges of the text window.
  632. With the scrolling commands it is possible to scroll to the text window
  633. without moving the cursor (unless it is at the top or bottom of text window).
  634. Type ctrl-<PgUp> to scroll the text up, or ctrl-<PgDn> to scroll the text
  635. down.
  636.  
  637. Horizontal scrolling is similar to vertical scrolling, except that the text
  638. window moves left or right a column at a time. As with vertical scrolling, WED
  639. automatically scrolls the text window left or right when the cursor is moved
  640. past the left or right margins. To perform horizontal scrolling without moving
  641. the cursor, type ctrl-<Home> to scroll left or ctrl-<End> to scroll right.
  642. Remember, WED requires that the cursor remain in the text window and on one of
  643. the characters in the file. This means that it is impossible to scroll the
  644. screen left if the cursor is in left column of the screen and on the last
  645. character of a line.
  646.  
  647.  
  648. 3.3  Up Screen and Down Screen
  649. The  up  and  down  arrow keys are fine for moving around the  screen,  but  sometimes  it  is
  650. necessary to move the cursor more than just a couple of lines. The up screen
  651. and down screen functions are useful for these situations. These commands move
  652. the cursor an entire screen at a time. This is twenty-two lines when in the
  653. full screen mode, and ten or eleven lines when in the split screen mode.
  654.  
  655. The Down Screen function is activated by pressing the <PgDn> key and the Up
  656. Screen function by pressing the <PgUp> key. Both of these functions can be
  657. used with a repeat factor to move large distances through the file. Repeat
  658. factors are explained below.
  659.  
  660. 3.4  Repeat Factors
  661. Sometimes  when moving around the file it is necessary to repeat a command  several  times.
  662. For example, to move the cursor down five screens of text it requires pressing
  663. the <PgDn> key five times. WED provides an easier way of repeating a command.
  664.  
  665. Entering a repeat factor before a command tells WED how many times to execute
  666. the command. To enter a repeat factor use the numeric keypad on the right side
  667. of the keyboard. Hold down the shift key and type the number (between 1 and
  668. 9999) and then the appropriate command key. For example, to move the cursor
  669. down 9 screens type the following:
  670.  
  671. shift-9<PgDn>.
  672.  
  673.  
  674.  
  675.  
  676. Repeat factors are also useful when setting up repeat loops in command macros.
  677. For more information on command macros refer to chapters 5 and 8.
  678.  
  679.  
  680. 3.5  The Goto Commands
  681. The  Goto command provides a means for quickly moving the cursor to a particular place  in
  682. a file. Top and Bottom sub-commands will move the cursor directly to the top
  683. or the bottom of a file. The Line sub-command will move the cursor to any line
  684. by specifying a particular line number. Also, the Goto command will move the
  685. cursor to any pointer that has been set during the edit session. For more
  686. information on pointers refer the section on setting pointers.
  687.  
  688. To invoke Goto type Alt-G and WED will display the Goto menu as shown in
  689. figure 3-1.
  690.  
  691. ┌─────────────────────────────────────────────────────────────────────────────────┐
  692. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next │
  693. │Line:     5  Col:   20    Insert                        Size:    7K Free:  227K  │
  694. │══════════════════════════════════╡ manual.c ╞═════════════╔═╡ GOTO ╞═╗═════════ │
  695. │/*  MANUAL.C   09/17/88  --  converts WED master file to ei║ Top      ║/«        │
  696. │/*                           manual, or laser file         ║ Bottom   ║/«        │
  697. │«                                                          ║ Line #   ║          │
  698. │#include <stdio.h>«                                        ║ Help     ║          │
  699. │#include <malloc.h>«                                       ╚═╡ <Esc> ╞╝          │
  700. │#include <string.h>«                                                             │
  701. └─────────────────────────────────────────────────────────────────────────────────┘
  702. Figure 3-1
  703.  
  704. If any pointers are set they will be listed along with the number of the line
  705. on which they are set. In the above example pointer one has been set on line
  706. 154.
  707.  
  708.  
  709. 3.5.1 Goto Top
  710. Select "Top" to move the cursor directly to the top of the current edit file.
  711.  
  712.  
  713. 3.5.2 Goto Bottom
  714. Select "Bottom" to move the cursor to the bottom (end) of the current edit
  715. file.
  716.  
  717.  
  718. 3.5.3 Goto Line Number
  719. To move directly to a particular line, select "Line #" and WED will prompt for
  720. the line number. Enter the number of the line to go to, and WED will move the
  721. cursor to that line.
  722.  
  723. 3.5.4 Goto Pointer
  724.  
  725.  
  726.  
  727. If any of WED's eight edit pointers have been set, the cursor can be moved to
  728. one of them by selecting that pointer from the Goto Menu.
  729.  
  730.  
  731. 4    Changing the File
  732.  
  733. 4.1  Entering Text
  734. When  entering WED the editor is in overwrite mode. This is the mode from which  most  of
  735. the editing functions, including text entry, is performed. Entering text is
  736. easy. Simply type the text the way it should appear. As each character is
  737. typed it appears on the screen at the current cursor position and the cursor
  738. then moves one character to the right. If the cursor is positioned over an
  739. existing character in the text any character that is typed will overwrite the
  740. existing character.
  741.  
  742. There are several special cases when entering text at the main edit mode. WED
  743. will never overwrite a carriage return. If new text is entered while the
  744. cursor is positioned at the end of a line the text will be inserted ahead of
  745. the carriage return. Another special case concerns the operation of the
  746. <Enter> key. Normally, pressing this key the cursor moves to the first charac-
  747. ter of the next line. The exception is if the cursor is positioned at the
  748. bottom of the file and the <Enter> key is struck. If this is the case WED will
  749. insert a carriage return and move the cursor to the beginning of the new line.
  750.  
  751.  
  752. 4.2  Inserting Text
  753. There are four commands for inserting text into a file. The first two commands, Insert Space
  754. and Insert Carriage Return, are useful for inserting just a few characters
  755. into a file. The Insert Space command inserts a space character at the cursor
  756. location. To use this command place the cursor at the position where the new
  757. character should be inserted. Press the grey plus <+> key located on the right
  758. keypad, and WED will insert a space at the cursor location.
  759.  
  760. The Insert Space command can also be used to insert characters other than
  761. spaces into a file. First press the grey <+> key to insert the space. Notice
  762. that WED leaves the cursor on the newly inserted space. Now type the character
  763. to be inserted and it will overwrite the new space.
  764.  
  765. Another useful command for quick insertions is the New line command. This
  766. command inserts a carriage return at the cursor location. To use this command
  767. hold down the <Ctrl> key and type M (Ctrl-M).
  768.  
  769. The other two insert commands are more useful when inserting larger amounts of
  770. text. Both commands perform similar functions, but with different approaches.
  771. Either command may be used to perform general text inserting. Which command
  772. chosen will depend mostly on personal preferences.
  773.  
  774. The first of these commands, the insert mode, is activated by typing Alt-I.
  775. When WED is in the insert mode the user can continue to move around the file
  776.  
  777.  
  778.  
  779. and execute commands just like the overwrite mode. The difference is that any
  780. text typed in the insert mode will be inserted ahead of the current cursor
  781. location.
  782.  
  783. The last command is the Insert command. This command also allows continuous
  784. text to be entered. Unlike the insert mode, other editing tasks cannot be
  785. performed while using the Insert command. The Insert command is sometimes
  786. easier to use than the insert mode because it opens a blank area on the screen
  787. in which text can be entered.
  788.  
  789. To use this command move the cursor to the position where text is to be
  790. inserted and press the <Ins> key to enter the Insert mode. As shown in figure
  791. 4-1, WED will then open two blank lines in which new text can be entered.
  792.  
  793. ┌────────────────────────────────────────────────────────────────────────────────┐
  794. │INSERT: Enter text, then <Ins>                                                  │
  795. │Line:     5  Col:   20    Insert                        Size:    7K Free:  227K │
  796. │══════════════════════════════════╡ manual.c ╞══════════════════════════════════│
  797. │/*  MANUAL.C   09/17/88  --  converts WED master file to either disk  */«       │
  798. │/*                           manual, or laser file                    */«       │
  799. │«                                                                               │
  800. └────────────────────────────────────────────────────────────────────────────────┘
  801. Figure 4-1
  802.  
  803. The text to be inserted should now be typed in. While in Insert mode there are
  804. two keys available for correcting mistakes: the backspace key and the home
  805. key. The backspace key (the key directly above the <Enter> key) will erase the
  806. last character entered. The <Home> key will erase all of the characters
  807. entered on the current line.
  808.  
  809. As lines are added the text below the insert will automatically drop down to
  810. make more room. If the auto indent mode is turned on WED will insert spaces
  811. for indentation at the beginning of each new line. Refer to section 6.1 for
  812. more information on auto indenting. After entering the text to be inserted,
  813. type Alt-I or press the <Ins> to exit insert mode. The gap after the inserted
  814. text will be closed and the command line will return to its normal state.
  815.  
  816. An insert session can be aborted by pressing the <Esc> key while in insert
  817. mode. WED will prompt "ABORT(Y/N)?" in the upper right hand corner of the
  818. screen. Enter "N" to continue inserting or "Y" to abort the inserted text. If
  819. yes is selected the text that has been inserted will be erased and WED will
  820. return to the command mode.
  821.  
  822.  
  823. 4.3  Erasing Text
  824. WED provides three commands for erasing text from a file. The first two commands, Delete
  825. Character and Erase, are described in this section. The third command, Zap, is
  826. described in section 5.4.
  827.  
  828.  
  829.  
  830. The Delete Character command is best for erasing just a few characters. There
  831. are two variations of this command: Delete Left and Delete cursor. To delete
  832. left, press the backspace key and WED will delete the character immediately to
  833. the left of the cursor. To delete cursor, press the minus key (located at the
  834. far right on the keyboard) and the character under the cursor will be deleted.
  835.  
  836. For removing more than a few characters at a time the Erase command is more
  837. practical. This command is invoked by typing Alt-E or by pressing the <Del>
  838. key. To use the command, move the cursor to the first character of the section
  839. of text to be removed and type Alt-E or <Del>. The screen will appear as shown
  840. in figure 4-2.
  841.  
  842.  
  843. ┌────────────────────────────────────────────────────────────────────────────────┐
  844. │ERASE: Move cursor, then <Del>                                                  │
  845. │Line:     5  Col:   20    Insert                        Size:    7K Free:  227K │
  846. │══════════════════════════════════╡ manual.c ╞══════════════════════════════════│
  847. │/*  MANUAL.C   09/17/88  --  converts WED master file to either disk  */«       │
  848. │/*                           manual, or laser file                    */«       │
  849. └────────────────────────────────────────────────────────────────────────────────┘
  850. Figure 4-2
  851.  
  852. Use the standard cursor movement commands to move the cursor to the last
  853. character of the text to be removed. As the cursor is moved the text between
  854. the starting point and the cursor will be shown in low intensity to designate
  855. that text as marked for erasure. Notice that the cursor can move to the left
  856. and/or up to un-mark text. When the cursor is on the last character of the
  857. text to be erased type Alt-E or <Del> and the text will be removed. To abort
  858. the erase command can press the <Esc> key.
  859.  
  860. If the Erase command is used to delete a large block of text the message,
  861. "text too large for delete buffer, ok to delete anyway?" may be displayed.
  862. This means the the block of text to be deleted is too large to fit in the
  863. delete buffer and thus will not be available for retrieval using the Undelete
  864. command. Type "Y" to complete the Erase operation, or type "N" to cancel the
  865. command.
  866.  
  867.  
  868. 4.4  Locating and Replacing Text
  869. To  locate, locate and replace or locate and delete any word or phrase (string of  characters)
  870. in the file use the Locate and Replace commands. The string can be as long as
  871. 66 characters.
  872.  
  873. Type Alt-L to invoke the Locate command and the screen will appear as shown in
  874. figure 4-3.
  875.  
  876.  
  877.  
  878.  
  879. ┌────────────────────────────────────────────────────────────────────────────────┐
  880. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  881. │Line:     5  Col:   20    Insert                        Size:    7K Free:  227K │
  882. │═════╔═════════════════════════════╡ LOCATE ╞═════════════════════════════╗═════│
  883. │/*  M║ Enter text, then <RET>                                             ║     │
  884. │/*   ║ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║     │
  885. │«    ╚════════════════════════════════════════════════════════════════════╝     │
  886. │#include <stdio.h>«                                                             │
  887. └────────────────────────────────────────────────────────────────────────────────┘
  888. Figure 4-3
  889.  
  890. Type the word or phrase to be located. If any errors are made WED provides
  891. some basic editing functions for correcting the entry. The left and right
  892. cursor keys move the cursor left and right. The Home and End keys move the
  893. cursor to the beginning or the end of the entry. Both the minus key and the
  894. <Del> key delete the character under the cursor. The plus key inserts a space
  895. at the cursor and the <Ins> key toggles between insert mode and overwrite
  896. mode. Typing ctrl-<End> deletes from the cursor to the end of the entry. When
  897. the entry is correct press the return key and the screen will appear as shown
  898. in figure 4-4.
  899.  
  900.  
  901. ┌────────────────────────────────────────────────────────────────────────────────┐
  902. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  903. │Line:     5  Col:   20    Insert                        Size:    7K Free:  227K │
  904. │═════╔═════════════════════════════╡ LOCATE ╞═════════════════════════════╗═════│
  905. │/*  M║ Enter text, then <RET>                                             ║     │
  906. │/*   ║ foo                                                                ║     │
  907. │«    ╚════════════════════════════════════════╔══════╡ Options ╞═════╗════╝     │
  908. │#include <stdio.h>«                           ║ occurrences:    1    ║          │
  909. │#include <malloc.h>«                          ║ Backward             ║          │
  910. │#include <string.h>«                          ║ Whole words only     ║          │
  911. │#include <ctype.h>«                           ║ Ignore case          ║          │
  912. │«                                             ║ Help                 ║          │
  913. │#define LF '\x0A'«                            ╚═╡ <Space> to select ╞╝          │
  914. │#define CR '\x0D'«                                                              │
  915. │«                                                                               │
  916. └────────────────────────────────────────────────────────────────────────────────┘
  917. Figure 4-4
  918.  
  919. These options are explained in section 4.4.1. To search without options press
  920. the return key. WED will then search from the current cursor location down
  921. towards the end of the file. If it finds the phrase entered the cursor will be
  922. moved to that location in the file. If it cannot find the phrase the cursor
  923. will not be moved.
  924.  
  925. To locate the next occurrence of the same phrase, type Ctrl-L (hold down the
  926. <Ctrl> key while pressing the L key) and WED will locate the next occurrence
  927.  
  928.  
  929.  
  930. of that phrase using the same locate options.
  931.  
  932. There is an additional feature for the Locate command which can be activated
  933. with the Setup command. When the Locate key flag is set to keep, WED will
  934. remember the last the phrase entered. The next time the Locate command is used
  935. WED will display the search phrase from the last time the command was issued.
  936. The phrase can be accepted, edited or a new one may be typed in. This feature
  937. is convenient when performing many searches for similar phrases. For more
  938. information on selecting this feature, refer to section 9.3.
  939.  
  940. The Replace command is similar to the Locate command. To invoke it, type Alt-R
  941. and the screen will appear as shown in figure 4-5.
  942.  
  943.  
  944. ┌────────────────────────────────────────────────────────────────────────────────┐
  945. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  946. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  947. │═════╔═════════════════════════════╡ REPLACE ╞════════════════════════════╗═════│
  948. │/*  M║ Enter old text, then <RET>                                         ║     │
  949. │/*   ║                                                                    ║     │
  950. │«    ║                                                                    ║     │
  951. │#incl║                                                                    ║     │
  952. │#incl╚════════════════════════════════════════════════════════════════════╝     │
  953. │#include <string.h>«                                                            │
  954. │#include <ctype.h>«                                                             │
  955. └────────────────────────────────────────────────────────────────────────────────┘
  956. Figure 4-5
  957.  
  958. Now type the word or phrase to be replaced. Complete the entry by pressing the
  959. return key. WED will then prompt for the replacement word or phrase as shown
  960. in figure 4-6.
  961.  
  962.  
  963. ┌────────────────────────────────────────────────────────────────────────────────┐
  964. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  965. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  966. │═════╔═════════════════════════════╡ REPLACE ╞════════════════════════════╗═════│
  967. │/*  M║ Enter old text, then <RET>                                         ║     │
  968. │/*   ║ foo                                                                ║     │
  969. │«    ║ Enter new text, then <RET>                                         ║     │
  970. │#incl║ bar                                                                ║     │
  971. │#incl╚════════════════════════════════════════════════════════════════════╝     │
  972. │#include <string.h>«                                                            │
  973. └────────────────────────────────────────────────────────────────────────────────┘
  974. Figure 4-6
  975.  
  976. Now enter the replacement string and complete the entry with the Enter key.
  977. The options prompt will then be displayed as shown in figure 4-7.
  978.  
  979.  
  980.  
  981.  
  982. ┌────────────────────────────────────────────────────────────────────────────────┐
  983. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  984. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  985. │═════╔═════════════════════════════╡ REPLACE ╞════════════════════════════╗═════│
  986. │/*  M║ Enter old text, then <RET>                                         ║     │
  987. │/*   ║ foo                                                                ║     │
  988. │«    ║ Enter new text, then <RET>                                         ║     │
  989. │#incl║ bar                                                                ║     │
  990. │#incl╚════════════════════════════════════════╔══════╡ Options ╞═════╗════╝     │
  991. │#include <string.h>«                          ║ occurrences:    1    ║          │
  992. │#include <ctype.h>«                           ║ Backward             ║          │
  993. │«                                             ║ Whole words only     ║          │
  994. │#define LF '\x0A'«                            ║ Ignore case          ║          │
  995. │#define CR '\x0D'«                            ║ No query             ║          │
  996. │«                                             ║ Global               ║          │
  997. │char  style_strings[][41] = { "<style1>",«    ║ Help                 ║          │
  998. │                              "<style2>",«    ╚═╡ <Space> to select ╞╝          │
  999. │                              "<style3>"«                                       │
  1000. └────────────────────────────────────────────────────────────────────────────────┘
  1001. Figure 4-7
  1002.  
  1003. To replace without options press the Enter key. WED will then search from the
  1004. current cursor location down towards the end of the file. If it finds the
  1005. phrase entered, the cursor will be moved to that location in the file, and the
  1006. prompt "REPLACE?" will appear in the upper right corner of the screen. Type
  1007. "Y" and the string will be replaced. If WED cannot find the phrase, the cursor
  1008. will be left in its original position.
  1009.  
  1010. To perform the same replacement on the next occurrence of the string, type
  1011. Ctrl-R and WED will repeat the Replace command, using the same search and
  1012. replacement strings and the same options.
  1013.  
  1014.  
  1015. 4.4.1 Locate and Replace Options
  1016. There are six options that help define the scope of the locate or replace
  1017. operation. When the return key is pressed at the options prompt WED looks for
  1018. an exact string of characters and conducts the search forward from the current
  1019. cursor position. The options give considerably more flexibility. None, one or
  1020. several of the options can be chosen. To select an option use to cursor keys
  1021. to move the cursor bar to the desired option and press the <space> key to
  1022. select that option. Pressing the <space> key again will deselect that option.
  1023. On option can also be selected or deselected by typing the first letter of the
  1024. option. For example, type "B" to select "Backward."  After selecting the
  1025. desired options press the <Enter> key and WED will begin searching. Each of
  1026. the available options is described in the following paragraphs.
  1027.  
  1028.  
  1029.  
  1030. 4.4.1.1    Occurrences
  1031. Both the Locate and Replace commands may specify the number of times to
  1032. perform the operation. This is referred to in the options menu as
  1033. "occurrences."  The default value is one which means locate (or replace) the
  1034. first occurrence of the phrase. To change this value enter the desired number
  1035. from any position in the options menu. Notice that the value is displayed next
  1036. to the "occurrences" prompt. The entry can be corrected by using the
  1037. <backspace> key.
  1038.  
  1039.  
  1040. 4.4.1.2    Backwards Option
  1041. The Backward option causes WED to search backward from the current cursor
  1042. location to the beginning of the file. It can be used with either the Locate
  1043. or the Replace command.
  1044.  
  1045.  
  1046. 4.4.1.3    Whole Words Option
  1047. The whole words option instructs WED to search for whole words only. WED will
  1048. skip over strings that are embedded in other words. For example, if the search
  1049. string is "the" and the cursor is at the beginning of the following line:
  1050.  
  1051. "and then the . . ."
  1052.  
  1053. Locate will not stop at "then" even though it begins with the string "the".
  1054. Instead, Locate will stop at the whole word "the".
  1055.  
  1056.  
  1057. 4.4.1.4    Ignore Case Option
  1058. The ignore case option instructs WED to ignore the difference between upper
  1059. and lower case letters. It will find all occurrences of the string, regardless
  1060. of which letters are capitalized.
  1061.  
  1062.  
  1063. 4.4.1.5    No Query Option
  1064. The No Query option only pertains to the Replace command. Normally the Replace
  1065. command asks for approval before each replace operation. With the No Query
  1066. option WED can be instructed to replace without querying for approval. This
  1067. feature is useful when performing multiple replaces. When replacing with the
  1068. No Query option WED will show each replacement as it occurs unless the Global
  1069. option is also chosen. If the Global option is chosen WED performs all
  1070. replacements before showing the altered file.
  1071.  
  1072. 4.4.1.6    Global Option
  1073. With the Global option WED can be instructed to replace all occurrences of a
  1074. string in the entire file. WED will start processing at the beginning of the
  1075. file and work towards the end. If this option is used in conjunction with the
  1076. Backward option WED will start at the end of the file and work towards the
  1077. beginning. When this option is used with the No Query option WED will perform
  1078. all replaces before displaying the altered file.
  1079.  
  1080.  
  1081.  
  1082.  
  1083. 5    Advanced Commands
  1084.  
  1085. 5.1  Setting Pointers
  1086. WED  will  set up to eight pointers in the text while editing. These pointers can  be  used  for
  1087. quick cursor movement with the Goto command or they can be used to mark text
  1088. for block commands such as Move and Copy which are described below.
  1089.  
  1090. To set a pointer move the cursor to the location the pointer should be placed
  1091. and type Alt-P to invoke the Pointer command and the screen will appear as
  1092. shown in figure 5-1.
  1093.  
  1094. ┌────────────────────────────────────────────────────────────────────────────────┐
  1095. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1096. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  1097. │══════════════════════════════════╡ manual.c ╞══════════╔═╡ POINTER ╞═╗═════════│
  1098. │[2][4]/*  MANUAL.C   09/17/88  --  converts WED master f║ 1           ║isk  */« │
  1099. │/*                           manual, or laser file      ║ 2      1    ║/«       │
  1100. │«                                                       ║ 3     12    ║         │
  1101. │#include <stdio.h>«                                     ║ 4      1    ║         │
  1102. │#include <malloc.h>«                                    ║ 5           ║         │
  1103. │#include <string.h>«                                    ║ 6           ║         │
  1104. │#include <ctype.h>«                                     ║ 7           ║         │
  1105. │«                                                       ║ 8           ║         │
  1106. │#define LF '\x0A'«                                      ║ Help        ║         │
  1107. │#define CR '\x0D'«                                      ╚══╡ <Esc> ╞══╝         │
  1108. │«                                                                               │
  1109. │[3]char  style_strings[][41] = { "<style1>",«                                   │
  1110. └────────────────────────────────────────────────────────────────────────────────┘
  1111. Figure 5-1
  1112.  
  1113. If any of the pointers are already set the number of the line on which they
  1114. are set will be displayed next to the pointer number. In addition, if any of
  1115. the pointers are set to a position within the text window their position in
  1116. the text will be indicated with the pointer number enclosed in square
  1117. brackets. In the example screen above, pointers one and four have been set.
  1118. Pointer four's position falls within the edit window and is indicated by
  1119. "[4]."
  1120.  
  1121. Now select one of the pointers to set it to the current cursor location. If
  1122. pointer that is already set is picked, it will forget the old location and be
  1123. set to the current location. WED will indicate the new setting by displaying
  1124. the pointer number in square brackets at the new pointer position in the text.
  1125.  
  1126.  
  1127. 5.2  Moving Text
  1128. The Move command moves a marked section of text from one part of a file to another.  This
  1129. command is useful when moving an entire paragraph or section of a file to
  1130. another location within the file.
  1131.  
  1132.  
  1133.  
  1134.  
  1135. Before executing the Move command, pointers must be placed at the beginning
  1136. and the end of the block of text to be moved. After marking the block to be
  1137. moved, move the cursor to the desired target location. Now invoke the Move
  1138. command by typing Alt-M and the screen will appear as shown in figure 5-2.
  1139.  
  1140.  
  1141. ┌────────────────────────────────────────────────────────────────────────────────┐
  1142. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1143. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  1144. │═════╔══════════════════════════════╡ MOVE ╞══════════════════════════════╗═════│
  1145. │/*  M║ Top Bottom Current 1 2 4  starting at                              ║     │
  1146. │/*   ╚═══════════════════════════╡ H for help ╞═══════════════════════════╝     │
  1147. │«                                                                               │
  1148. │#include <stdio.h>«                                                             │
  1149. │#include <malloc.h>«                                                            │
  1150. └────────────────────────────────────────────────────────────────────────────────┘
  1151. Figure 5-2
  1152.  
  1153. In this example pointers number 1 and 2 have been set as indicated by the "1"
  1154. and the "2" in the prompt line. Now enter the number of the pointer that marks
  1155. the beginning of the block to be moved. Note that Top, Bottom or Current
  1156. location may be used as an end point. After the first pointer number has been
  1157. entered (in this example, 1) the prompt will change to the screen shown in
  1158. figure 5-3.
  1159.  
  1160.  
  1161. ┌────────────────────────────────────────────────────────────────────────────────┐
  1162. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1163. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  1164. │═════╔══════════════════════════════╡ MOVE ╞══════════════════════════════╗═════│
  1165. │/*  M║ Top Bottom Current 1 2 4  starting at  1,  ending at               ║     │
  1166. │/*   ╚═══════════════════════════╡ H for help ╞═══════════════════════════╝     │
  1167. │«                                                                               │
  1168. │#include <stdio.h>«                                                             │
  1169. │#include <malloc.h>«                                                            │
  1170. └────────────────────────────────────────────────────────────────────────────────┘
  1171. Figure 5-3
  1172.  
  1173.  
  1174. Enter the number of the pointer that marks the end of the block to be moved,
  1175. and WED will move the block of text to the current cursor location.
  1176.  
  1177.  
  1178. 5.3  Copying Text
  1179. The  Copy  command  makes  a  duplicate copy of a marked section  of  text  in  the  file  and
  1180. places that copy at the current cursor location. This command is useful when
  1181. repeating a section of the text once or more in a file.
  1182.  
  1183.  
  1184.  
  1185. Before executing the Copy command pointers must be placed at the beginning and
  1186. the end of the block of text to be copied. After the block to be copied has
  1187. been marked, move the cursor to the desired target location. To invoke the
  1188. Copy command type Alt-C and the screen will appear as shown in figure 5-4.
  1189.  
  1190.  
  1191. ┌────────────────────────────────────────────────────────────────────────────────┐
  1192. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1193. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  1194. │═════╔══════════════════════════════╡ COPY ╞══════════════════════════════╗═════│
  1195. │/*  M║ Top Bottom Current 1 2 4  starting at  1,  ending at               ║     │
  1196. │/*   ╚═══════════════════════════╡ H for help ╞═══════════════════════════╝     │
  1197. │«                                                                               │
  1198. │#include <stdio.h>«                                                             │
  1199. │#include <malloc.h>«                                                            │
  1200. └────────────────────────────────────────────────────────────────────────────────┘
  1201. Figure 5-4
  1202.  
  1203. In this example pointers number 1 and 2 have been set as indicated by the "1"
  1204. and the "2" in the prompt line. Now enter the number of the pointer that marks
  1205. the beginning of the block to be copied. Note that the Top, Bottom or Current
  1206. location may be used as an beginning point. After entering first pointer
  1207. number (in this example, 1) you will be prompted for the ending pointer. Now
  1208. enter the number of the pointer that marks the end of the block to be copied
  1209. and WED will copy the block of text to the current cursor location.
  1210.  
  1211.  
  1212. 5.4  Zapping Text
  1213. The Zap command provides a quick way to delete large sections of text from a file.
  1214.  
  1215. Before executing the Zap command, pointers must be placed at the beginning and
  1216. the end of the block of text to be deleted. After marking the block to be
  1217. deleted type Alt-Z to invoke the Zap command and the screen will appear as
  1218. shown in figure 5-5.
  1219.  
  1220.  
  1221. ┌────────────────────────────────────────────────────────────────────────────────┐
  1222. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1223. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  1224. │═════╔══════════════════════════════╡ ZAP  ╞══════════════════════════════╗═════│
  1225. │/*  M║ Top Bottom Current 1 2 4  starting at  1,  ending at               ║     │
  1226. │/*   ╚═══════════════════════════╡ H for help ╞═══════════════════════════╝     │
  1227. │«                                                                               │
  1228. │#include <stdio.h>«                                                             │
  1229. │#include <malloc.h>«                                                            │
  1230. └────────────────────────────────────────────────────────────────────────────────┘
  1231. Figure 5-5
  1232.  
  1233. In this example the number 1 and 2 pointers have been set as indicated by the
  1234.  
  1235.  
  1236.  
  1237. "1" and the "2" in the prompt line. Now enter the number of the pointer that
  1238. marks the beginning of the block to be deleted. Note that the Top, Bottom or
  1239. Current location may be used as a beginning point. After entering the first
  1240. pointer number (in this example, 1) you will be prompted for the ending
  1241. pointer. Now enter the number of the pointer that marks the end of the block
  1242. to be zapped and WED will delete the block of text from the file.
  1243.  
  1244. If the Zap command is used to delete a large block of text the message, "text
  1245. too large for delete buffer, ok to delete anyway?" may be displayed. This
  1246. means the block of text to be deleted is too large to fit in the delete buffer
  1247. and thus will not be available for retrieve the text using the Undelete
  1248. command. Type "Y" to complete the Zap operation or type "N" to cancel the
  1249. command.
  1250.  
  1251.  
  1252. 5.5  Undeleting Text
  1253. When  deleting text with the Erase or Zap commands WED automatically saves the  deleted
  1254. text in the delete buffer. With the Undelete command the most recently deleted
  1255. block of text can be retrieved. To Undelete text move the cursor to the point
  1256. where the deleted text should be placed, and type Alt-U.
  1257.  
  1258. The delete buffer also be used for quick cut and paste operations. Simply
  1259. delete the source block, move the cursor to the new position, and then use the
  1260. Undelete command to insert the deleted block at the new location.
  1261.  
  1262.  
  1263. 5.6  Appending Text from Other Files
  1264. The  Append  command  enables  text  to be inserted from another file  into  the  file  that  is
  1265. currently being edited. To invoke the Append command move the cursor to the
  1266. position where the other file should be inserted and then type Alt-A. The
  1267. screen will now appear as shown in figure 5-6.
  1268.  
  1269. ┌────────────────────────────────────────────────────────────────────────────────┐
  1270. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1271. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  1272. │═════════╔════════════════════════╡ APPEND FILE ╞═══════════════════════╗═══════│
  1273. │/*  MANUA║   Path: F:\\*.*                                              ║       │
  1274. │/*       ║   File: share.doc                                            ║       │
  1275. │«        ║                                                              ║       │
  1276. │#include ║   manual   c     share    doc   zepixpro doc                 ║       │
  1277. │#include ║                                                              ║       │
  1278. │/*=======║                                                              ║       │
  1279. │«        ╚═════╡ Ctrl-PgDn for new dir; Ctrl-Home for current dir ╞═════╝       │
  1280. │void shareware()«                                                               │
  1281. │«                                                                               │
  1282. └────────────────────────────────────────────────────────────────────────────────┘
  1283. Figure 5-6
  1284.  
  1285. Enter the name of the file to be inserted. Include the disk drive and path if
  1286.  
  1287.  
  1288.  
  1289. desired. If one is not specified WED will default to the same disk and path of
  1290. the main edit file. WED will then insert that entire file at the current
  1291. cursor location.
  1292.  
  1293.  
  1294. 5.7  Writing Text to Another File
  1295. The Write command writes a marked block of text from the current file to a new file on disk.
  1296. It is a useful command for creating stock paragraphs or for saving sections of
  1297. a file that will later be inserted into other files.
  1298.  
  1299. Before executing the Write command pointers must be placed at the beginning
  1300. and the end of the block of text that will be written. After marking the block
  1301. to be written, type Alt-W to invoke the write command. WED will prompt as
  1302. shown in figure 5-9.
  1303.  
  1304. ┌────────────────────────────────────────────────────────────────────────────────┐
  1305. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1306. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  1307. │═════╔══════════════════════════════╡ WRITE ╞═════════════════════════════╗═════│
  1308. │/*  M║ Top Bottom Current 1 2 4  starting at  1,  ending at               ║     │
  1309. │/*   ╚═══════════════════════════╡ H for help ╞═══════════════════════════╝     │
  1310. │«                                                                               │
  1311. │#include <stdio.h>«                                                             │
  1312. │#include <malloc.h>«                                                            │
  1313. └────────────────────────────────────────────────────────────────────────────────┘
  1314. Figure 5-7
  1315.  
  1316. In this example, pointers number 1 and 2 have been set as indicated by the "1"
  1317. and the "2" in the prompt line. Enter the number of the pointers that mark the
  1318. beginning and end of the block to be written. Note that the Top of file,
  1319. Bottom of file or Current cursor location may be used as beginning or end
  1320. points.
  1321.  
  1322. Now enter the number of the pointer that marks the end of the block to be
  1323. written. WED will now ask for the file to write to as shown in figure 5-8.
  1324.  
  1325.  
  1326.  
  1327.  
  1328. ┌────────────────────────────────────────────────────────────────────────────────┐
  1329. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1330. │Line:    11  Col:    1    Insert                        Size:    7K Free:  227K │
  1331. │══════╔══════════════════════════════╡ WRITE ╞═════════════════════════════╗════│
  1332. │/*  MA║ Top Bottom Current 1 2  starting at  1,  ending at  2              ║    │
  1333. │/*   ╔═══════════════════════╡ WRITE TO FILE ╞══════════════════════╗══════╝    │
  1334. │«    ║   Path: F:\\*.*                                              ║           │
  1335. │#incl║   File:                                                      ║           │
  1336. │#incl║                                                              ║           │
  1337. │#incl║   manual   c     share    doc   zepixpro doc                 ║           │
  1338. │#incl║                                                              ║           │
  1339. │/*===║                                                              ║=*/«       │
  1340. │«    ╚═════╡ Ctrl-PgDn for new dir; Ctrl-Home for current dir ╞═════╝           │
  1341. │void shareware()«                                                               │
  1342. └────────────────────────────────────────────────────────────────────────────────┘
  1343. Figure 5-8
  1344.  
  1345. Enter the name of the file to which to write the block of text to and press
  1346. the return key. A disk drive and path can be included when entering the name.
  1347. If they are not included, WED will default to the same disk and path as the
  1348. main edit file. WED will now write the marked text out to the specified file.
  1349. Note: if the name of an existing file is specified that file will be replaced
  1350. by the new file.
  1351.  
  1352. 5.8  Editing Multiple Files
  1353. Often  while  editing situations may occur where it is desirable to be able to switch  back  and
  1354. forth between several files with a minimum of time and effort. With the Other
  1355. Files command WED allows up to ten separate edit files to be loaded at one
  1356. time. Switching between those files, copying text between them and even
  1357. displaying two of them at the same time is quite easy.
  1358.  
  1359. With this powerful feature, the task of working on large systems that span
  1360. over multiple files is greatly simplified. For example, an external
  1361. declaration can be displayed in one window while editing the code that uses
  1362. that declaration is displayed in the other window. It is even possible to copy
  1363. select sections of text of code from one file to another.
  1364.  
  1365. 5.8.1 Opening Other Files
  1366. To execute the Other file command type Alt-O from the main edit menu. WED will
  1367. display the Other File menu as shown in figure 5-9.
  1368.  
  1369.  
  1370.  
  1371.  
  1372. ┌────────────────────────────────────────────────────────────────────────────────┐
  1373. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1374. │Line:    11  Col:    1    Insert                        Size:    7K Free:  227K │
  1375. │══════════════════════════════════╡ manual.c ╞══════╔═╡ OTHER FILE ╞══╗═════════│
  1376. │/*  MANUAL.C   09/17/88  --  converts WED master fil║ Open other file ║/«       │
  1377. │/*                           manual, or laser file  ║ Zoom (in/out)   ║/«       │
  1378. │«                                                   ║ Resize window   ║         │
  1379. │#include <stdio.h>«                                 ║ Help            ║         │
  1380. │#include <malloc.h>«                                ╚════╡ <Esc> ╞════╝         │
  1381. │#include <string.h>«                                                            │
  1382. └────────────────────────────────────────────────────────────────────────────────┘
  1383. Figure 5-9
  1384.  
  1385. Select "Open other file" and WED will prompt for the name of the Other file to
  1386. edit. If the name of a file which does not exist is entered WED will create a
  1387. new file.
  1388.  
  1389. Once the other file is loaded it can be edited with all the features available
  1390. for the primary file. With the split screen feature described below WED can
  1391. split the display screen and display both edit files simultaneously.
  1392.  
  1393. The Load Other File command can be repeated for loading up to ten files at the
  1394. same time.
  1395.  
  1396.  
  1397. 5.8.2 Switching Between Files
  1398. Switching between files loaded with the Other files command is easy. Type Alt-
  1399. O to invoke the Other files command and WED will list any other open files at
  1400. the bottom of the menu as shown in figure 5-10.
  1401.  
  1402.  
  1403.  
  1404.  
  1405. ┌────────────────────────────────────────────────────────────────────────────────┐
  1406. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1407. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  1408. │══════════════════════════════════╡ manual.c ╞══════╔═╡ OTHER FILE ╞══╗═════════│
  1409. │/*  MANUAL.C   09/17/88  --  converts WED master fil║ Open other file ║/«       │
  1410. │/*                           manual, or laser file  ║ Zoom (in/out)   ║/«       │
  1411. │«                                                   ║ Resize window   ║         │
  1412. │#include <stdio.h>«                                 ║ Help            ║         │
  1413. │#include <malloc.h>«                                ║                 ║         │
  1414. │#include <string.h>«                                ║ 1 F:\demo.c     ║         │
  1415. │#include <ctype.h>«                                 ╚════╡ <Esc> ╞════╝         │
  1416. │«                                                                               │
  1417. │#define LF '\x0A'«                                                              │
  1418. │#define CR '\x0D'«                                                              │
  1419. │═══════════════════════════════════╡ demo.c ╞═══════════════════════════════════│
  1420. │#include <stdio.h>«                                                             │
  1421. │«                                                                               │
  1422. │main()«                                                                         │
  1423. │{«                                                                              │
  1424. │   fprintf( stdout, "Hello WED World!" );«                                      │
  1425. │}«                                                                              │
  1426. └────────────────────────────────────────────────────────────────────────────────┘
  1427. Figure 5-10
  1428.  
  1429. Select the desired file from the list of open files.
  1430.  
  1431.  
  1432. 5.8.3 Quitting Other Files
  1433. Quitting a file when more than one file is loaded is the same as quitting with
  1434. only one file loaded. Instead of returning to the main menu or exiting to DOS
  1435. WED will switch to the next most recently accessed open file.
  1436.  
  1437.  
  1438. 5.8.4 The Zoom Command
  1439. As mentioned above, WED has the ability to display two files at the same time.
  1440. This is called split screen editing and is accomplished by splitting the
  1441. screen with a horizontal line and displaying one file in the top window and
  1442. the other in the lower window. It is possible to switch back and forth between
  1443. full screen editing and split screen editing with the "Zoom (in/out)" option
  1444. of the Other files command. The default mode can be set (split or full screen)
  1445. with the Setup command.
  1446.  
  1447.  
  1448. 5.8.5 Resizing Windows
  1449. When using the split screen mode WED splits the screen in the middle by
  1450. default. This can be changed using the "Resize window" option of the Other
  1451. files command. Select the option, then use the <up> and <down> cursor keys to
  1452. move the split bar to the desired row and then press the <Esc> key to complete
  1453.  
  1454.  
  1455.  
  1456. the operation. The can set the default size for split screens with the Setup
  1457. command.
  1458.  
  1459.  
  1460. 5.9  Copying Text Between Files
  1461. The  Bridge  command is similar to the Copy command. The only difference being  it  copies
  1462. text from another file thus providing a bridge between the two files. To use
  1463. the Bridge command it is necessary to first load both files using the Other
  1464. File command. The next step is to place pointers at the beginning and the end
  1465. of the block of text to be copied. After marking the block to be copied,
  1466. switch to the destination file by typing Alt-O. Move the cursor to the place
  1467. in the destination file where the block will be copied to. Type Alt-B and WED
  1468. will prompt for the source file (the file containing the text to be copied) as
  1469. shown in figure 5-11.
  1470.  
  1471. ┌────────────────────────────────────────────────────────────────────────────────┐
  1472. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1473. │Line:     1  Col:    1    Insert                        Size:    7K Free:  227K │
  1474. │══════════════════════════════════╡ manual.c ╞══════╔═══╡ BRIDGE ╞════╗═════════│
  1475. │/*  MANUAL.C   09/17/88  --  converts WED master fil║ From what file? ║/«       │
  1476. │/*                           manual, or laser file  ║                 ║/«       │
  1477. │«                                                   ║ 1 F:\demo.c     ║         │
  1478. │#include <stdio.h>«                                 ╚════╡ <Esc> ╞════╝         │
  1479. │#include <malloc.h>«                                                            │
  1480. └────────────────────────────────────────────────────────────────────────────────┘
  1481. Figure 5-11
  1482.  
  1483. Next, WED will prompt for the beginning and ending points of the block of
  1484. text. Specify the pointers in the same manner as with the Copy command.
  1485. Remember that the pointers referred to are the pointers set in the source
  1486. file. WED will then copy the text from the other file into the current file at
  1487. the current cursor location.
  1488.  
  1489.  
  1490. 5.10 The DOS Command
  1491. WED  provides  a  gateway to DOS which allows DOS commands or  other  programs  to  be
  1492. executed without ending the WED edit session. To use this feature type Alt-D
  1493. from the main menu. The screen will clear and the DOS prompt will be
  1494. displayed. Enter commands in the same manner as if at the normal DOS prompt.
  1495. To return to the editor enter "EXIT" and WED will resume the interrupted edit
  1496. session.
  1497.  
  1498. When using the DOS gateway command  WED remains in memory along with the
  1499. file(s) that are being edited. This means that there will be less memory
  1500. available to any programs being run while under this command.
  1501.  
  1502. If the drive or subdirectory is changed while in the DOS gateway, it must be
  1503. changed back before returning to WED with the "EXIT" command.
  1504.  
  1505.  
  1506.  
  1507. 6    Editing with Word-Wrap
  1508. The  word-wrap  option  in  WED  is designed to  support  documentation  tasks.  When  the
  1509. word-wrap option is turned text can be entered without worrying about where
  1510. the right margin is. When typing past the right margin WED will automatically
  1511. break the current line at the last word break and then move the current word
  1512. to the next line. If changes are made to the text the margins can be realigned
  1513. with the format command.
  1514.  
  1515.  
  1516. 6.1  Word-Wrap Mode
  1517. WordWrap mode causes the text to automatically drop down to the next line when the  right
  1518. margin is passed while entering text. This is similar to the way a word
  1519. processor functions. To use the word-wrap mode set the word-wrap setup field
  1520. to "on" and select the desired right margin setting. This can be done using
  1521. the "Setup" command as described in Chapter 10.
  1522.  
  1523. Once the word-wrap mode has been selected begin entering text with either the
  1524. insert or overwrite mode. When typing past the right margin WED will scan back
  1525. to the beginning of the current word and insert a carriage return. The current
  1526. word will be moved to the next line. This allows continuous typing with out
  1527. the need to hit the <enter> key to end a line.
  1528.  
  1529. Word-Wrapped text can be indented by setting auto-indent value in the setup
  1530. screen to "yes". When this has been done WED will automatically indent the new
  1531. lines created by word-wrap to the same column as the previous lines.
  1532.  
  1533.  
  1534. 6.2  Reformatting a Paragraph with Format
  1535. The  word-wrap  mode works well when entering new text, but it does  not  automatically  re-
  1536. format text when the text is moved or deleted inside a paragraph. To reformat
  1537. text within the margins it is necessary to use the Format command. Place
  1538. pointers at the beginning and end of the paragraph(s) to be reformatted and
  1539. type Alt-F. The screen will appear as shown in figure 6-1.
  1540.  
  1541. ┌────────────────────────────────────────────────────────────────────────────────┐
  1542. │Line:     1  Col:    1    Overwrite                     Size:    7K Free:  227K │
  1543. │══════════════════════════════════╡ manual.c ╞═══════════╔═╡ FORMAT ╞═╗═════════│
  1544. │/*  MANUAL.C   09/17/88  --  converts WED master file to ║ Indent     ║/«       │
  1545. │/*                           manual, or laser file       ║ Undent     ║/«       │
  1546. │«                                                        ║ Paragraph  ║         │
  1547. │#include <stdio.h>«                                      ║ Help       ║         │
  1548. │#include <malloc.h>«                                     ╚══╡ <Esc> ╞═╝         │
  1549. │#include <string.h>«                                                            │
  1550. └────────────────────────────────────────────────────────────────────────────────┘
  1551. Figure 6-1
  1552.  
  1553. Select the "Paragraph" option and WED will prompt for the left and right
  1554. margins. Note that WED will provide default values. The left margin will
  1555. default to one and the right margin will default to the value selected with
  1556.  
  1557.  
  1558.  
  1559. the Setup command. Enter the margin values and then WED will prompt for the
  1560. beginning and end of the paragraph to re-format. Enter the numbers of the
  1561. pointers to mark the text to be reformatted. WED will re-flow the text between
  1562. the pointers using the same rules it uses when entering text with word-wrap.
  1563.  
  1564.  
  1565. 7    Special Features for Programmers
  1566.  
  1567. 7.1  Auto-Indent Mode
  1568. The auto indent mode saves key strokes when editing programs which use indentation.  This
  1569. feature only operates when the editor is in the Insert mode.
  1570.  
  1571. If auto indent is turned on and text is being entered in the Insert mode,
  1572. after each carriage return WED will indent the next line to the same level as
  1573. the current line. It does this by automatically entering spaces or tabs at the
  1574. beginning of the line. To change the indentation level of the new line, use
  1575. either the backspace or space keys to reduce or increase the indentation level
  1576. of the line.
  1577.  
  1578. Auto indent checks the Tab Conversion flag to determine if it should insert
  1579. spaces or tabs. If the flag is set to "spaces" auto indent will use only
  1580. spaces. If it is instead set to "tabs" auto indent will use tabs whenever
  1581. possible. The setting of the Tab Conversion flag can be change with the Setup
  1582. command.
  1583.  
  1584. 7.2  Re-Indenting with Format
  1585. The  Format  command  allows blocks of text to be moved to the left or to the  right.  This  is
  1586. useful for programmers working in structured languages such as C and PASCAL.
  1587. With this command the indentation of entire blocks of code can be changed with
  1588. one command.
  1589.  
  1590. Before executing the format command pointers must be placed at the beginning
  1591. and the end of the block of text to be reformatted. After marking the block
  1592. type Alt-F to invoke the Format command. The menu will appear as shown in
  1593. figure 7-1.
  1594.  
  1595. ┌────────────────────────────────────────────────────────────────────────────────┐
  1596. │Line:     1  Col:    1    Overwrite                     Size:    7K Free:  227K │
  1597. │══════════════════════════════════╡ manual.c ╞═══════════╔═╡ FORMAT ╞═╗═════════│
  1598. │/*  MANUAL.C   09/17/88  --  converts WED master file to ║ Indent     ║/«       │
  1599. │/*                           manual, or laser file       ║ Undent     ║/«       │
  1600. │«                                                        ║ Paragraph  ║         │
  1601. │#include <stdio.h>«                                      ║ Help       ║         │
  1602. │#include <malloc.h>«                                     ╚══╡ <Esc> ╞═╝         │
  1603. │#include <string.h>«                                                            │
  1604. └────────────────────────────────────────────────────────────────────────────────┘
  1605. Figure 7-1
  1606.  
  1607. To move the text block to the right select Indent. Otherwise select Undent to
  1608.  
  1609.  
  1610.  
  1611. un-indent the block (move it to the left). Next enter the number of spaces to
  1612. move the text. Then WED will prompt for the end points of the block to re-
  1613. indent as shown in figure 7-2.
  1614.  
  1615. ┌────────────────────────────────────────────────────────────────────────────────┐
  1616. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1617. │Line:    22  Col:    1    Insert                        Size:    7K Free:  227K │
  1618. │══════════════════════════════════╡ manual.c ╞═══════════╔═╡ FORMAT ╞═╗═════════│
  1619. │#define CR '\x0D'«                                       ║ Indent     ║         │
  1620. │«                                          ╔═════╡ INDENT ╞══════╗    ║         │
  1621. │char  style_strings[][41] = { "<style1>",« ║ How Many Spaces? 4  ║ph  ║         │
  1622. │╔═════════════════════════════╡ INDENT ╞═════════════════════════════╗║         │
  1623. │║ Top Bottom Current 1 2  starting at  1,  ending at                 ║╝         │
  1624. │╚═══════════════════════════╡ H for help ╞═══════════════════════════╝          │
  1625. └────────────────────────────────────────────────────────────────────────────────┘
  1626.                               Figure 7-2
  1627.  
  1628. Enter the pointers marking the beginning and the end of the block to be re-
  1629. indented. Notice that the Top or Bottom of the file or the Current cursor
  1630. location can be used as a beginning or end point. WED will now re-indent the
  1631. block.
  1632.  
  1633. The Indent function is aware of the Tab Conversion flag. If the flag is set to
  1634. "spaces" Indent will use only spaces. Otherwise Indent will indent the lines
  1635. with tabs whenever possible. The Tab Conversion setting can be altered with
  1636. the Setup command.
  1637.  
  1638.  
  1639. 7.3  The Execute User Program Command
  1640. The   eXecute  user  program  command  is  an  advanced  command  designed  to   facilitate
  1641. program development. With a single command the current edit file can be saved,
  1642. compiled and then editing can be resumed. This greatly reduces the effort and
  1643. time required to switch back and forth between the editor and the compiler or
  1644. assembler.
  1645.  
  1646. Before using this command it is necessary to the Setup command to tell WED
  1647. what compiler(s) and assembler(s) will be in use. This process is described in
  1648. chapter 10 of this manual.
  1649.  
  1650. To execute the user program command type Alt-X while at the main edit prompt.
  1651. WED will display a sub menu of the programs that have been installed. For
  1652. example, if a C compiler and an assembler have been installed the prompt might
  1653. appear as shown in figure 7-3.
  1654.  
  1655.  
  1656.  
  1657.  
  1658. ┌────────────────────────────────────────────────────────────────────────────────┐
  1659. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1660. │Line:        Col:         Insert                        Size:    7K Free:  227K │
  1661. │══════════════════════════════════╡ manual.c ╞═════╔═╡ EXECUTE USER ╞═╗═════════│
  1662. │#define CR '\x0D'«                                 ║ <Esc> to exit    ║         │
  1663. │«                                                  ║                  ║         │
  1664. │char  style_strings[][41] = { "<style1>",«         ║ MSC 5.1          ║         │
  1665. │                              "<style2>",«         ║ LINT             ║         │
  1666. │                              "<style3>"«          ║ TASM 2.0         ║         │
  1667. │                              };«                  ╚═════╡ <Esc> ╞════╝         │
  1668. └────────────────────────────────────────────────────────────────────────────────┘
  1669. Figure 7-3
  1670.  
  1671. After selecting the program to be executed WED will save the current edit file
  1672. and setup a command line on the screen as shown in figure 7-4. Notice that WED
  1673. displays the amount of memory available for the program to run in.
  1674.  
  1675. ┌────────────────────────────────────────────────────────────────────────────────┐
  1676. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1677. │Line:        Col:         Insert                        Size:    7K Free:  227K │
  1678. │══════════════════════════════════╡ manual.c ╞══════════════════════════════════│
  1679. │Memory available: 340K                                                          │
  1680. │                                                                                │
  1681. │d:\msc\bin\cl  F:\manual.c                                                      │
  1682. │                                                                                │
  1683. └────────────────────────────────────────────────────────────────────────────────┘
  1684.                               Figure 7-4
  1685.  
  1686. The command line can be edited to add any command line parameters as needed.
  1687. Press the <Enter> key to run the program.
  1688.  
  1689. When the user program completes execution WED will present the menu as shown
  1690. in figure 7-5.
  1691.  
  1692. ┌────────────────────────────────────────────────────────────────────────────────┐
  1693. │WED: Help Insert Erase Pointer Goto Copy Move Zap Undel Locate Replace Quit Next│
  1694. │Saving . . .    Processing . . .                                                │
  1695. │══════════════════════════════════╡ manual.c ╞═════╔═╡ EXECUTE USER ╞═╗═════════│
  1696. │Memory available: 340K                             ║ Continue editing ║         │
  1697. │                                                   ║ Main menu        ║         │
  1698. │d:\msc\bin\cl  F:\manual.c                         ║ Exit WED         ║         │
  1699. │                                                   ║ Help             ║         │
  1700. │                                                   ╚═════╡ <Esc> ╞════╝         │
  1701. └────────────────────────────────────────────────────────────────────────────────┘
  1702. Figure 7-5
  1703.  
  1704. Select "Continue editing" to return to the current edit file. This option is
  1705. useful when attempting to fix syntax errors reported by the compiler.
  1706.  
  1707.  
  1708.  
  1709.  
  1710. Select "Main menu" to exit the current edit file and return to the WED main
  1711. menu (remember, the current edit file was automatically saved just prior to
  1712. executing the user program). If more than one file is loaded WED will switch
  1713. to the most recent file instead of the main menu.
  1714.  
  1715. Select "Exit WED" to exit the current edit file and return to the DOS "C"
  1716. prompt. As with the "Main menu" option WED will switch to one of the other
  1717. file if more than one edit file is loaded.
  1718.  
  1719.  
  1720. 7.4  The Pop-up ASCII Table
  1721. As  a convenience to programmers WED includes a pop-up ASCII reference table. To  pop-
  1722. up the table type alt-Y while in the main edit mode. The <Up> and <Dn> arrow
  1723. keys can be used to page through all 256 ASCII character values. After using
  1724. the table press the <Esc> key to return to editing.
  1725.  
  1726. This can be useful when using the graphics command to enter special
  1727. characters. To find out which key to press to enter a desired high-bit
  1728. character, look up the character in the table, and the required keystroke will
  1729. be displayed to its left.
  1730.  
  1731.  
  1732. 8    Editing Special Characters
  1733.  
  1734. 8.1  Editing Files with Control Characters
  1735. The  WED  editor has the ability to edit special characters called  control  characters.  These
  1736. are the characters that can only be entered from the drop down insert mode. To
  1737. enter a control character hold down the <Ctrl> key and type the letter or
  1738. symbol. For example, to enter control-L hold down the <Ctrl> key and type L.
  1739. Control characters are displayed as a carat, ^, followed by the alphabetical
  1740. character. For example, Ctrl-G will be displayed as ^G. There is one exception
  1741. to this rule. The carriage return character (^M) displays as the special end
  1742. of line character.
  1743.  
  1744.  
  1745. 8.2  Using Text or Graphics Characters
  1746. One  of the nice features of the IBM PC and compatible computers is their ability to  display
  1747. special graphics characters while in the standard text mode. These are the
  1748. high-bit set characters with ASCII values from 128 to 255. The most commonly
  1749. used characters are the line drawing characters used for drawing boxes and
  1750. tables. The outline boxes displayed on the opening screen of WED are drawn
  1751. using the line drawing characters.
  1752.  
  1753. WED has a special graphics mode which enables all of these characters to be
  1754. entered and edited. To switch to the graphics mode type Alt-T. Notice that the
  1755. mode displayed at the upper right corner of the text window changes from Text
  1756. to Graphics. Once WED is in the graphics mode it will translate any input
  1757. characters to graphics characters by setting the high order bit to 1. Appendix
  1758.  
  1759.  
  1760.  
  1761. C contains a table listing all of the possible input characters and graphics
  1762. characters that they will be translated to. For example, to enter the double
  1763. horizontal line character used at the top of the text window in WED switch to
  1764. graphics mode and type M.
  1765.  
  1766. To switch back to the text mode type Alt-T. The Text command (Alt-T) can be
  1767. used to toggle between the text and graphics modes while in the main edit mode
  1768. or in the insert mode.
  1769.  
  1770. 9    Printing Files
  1771. The  WED editor includes a file printing utility which is useful for printing source  code  files
  1772. as well as text files. Features include margin control, line numbering and
  1773. header lines with the file name, time and date, page number and a user entered
  1774. title.
  1775.  
  1776. To print a file select option two from the main menu and then  select a file
  1777. to print. WED will then display the print menu shown in figure 9-1.
  1778.  
  1779. ╔═══════════════╡ Print Parameters ╞═══════════════╗
  1780. ║  print header      yes                           ║
  1781. ║  print line nos    yes                           ║
  1782. ║  title                                           ║
  1783. ║                                                  ║
  1784. ║  page height       66                            ║
  1785. ║  page width        80                            ║
  1786. ║  top margin        3                             ║
  1787. ║  bottom margin     3                             ║
  1788. ║  left margin       10                            ║
  1789. ║                                                  ║
  1790. ║  setup string                                    ║
  1791. ║  reset string                                    ║
  1792. ╚════════════════╡ <PgDn> to print ╞═══════════════╝
  1793. Figure 9-1
  1794.  
  1795. Use the <Up> and <Down> cursor keys to move between fields. Enter or change
  1796. the values in any of the fields as desired and press the <PgDn> key to begin
  1797. printing. The following paragraphs describe the individual printing
  1798. parameters. For a better understanding of the margins refer to the page layout
  1799. diagram 9-2 at the end of this chapter.
  1800.  
  1801. The first field indicates if WED should print header lines at the top of each
  1802. page. These header lines include: the file name, a user entered title, the
  1803. page number and the current time and date. This option is very useful when
  1804. generating source code listings. Press the <space> bar to toggle between "yes"
  1805. and "no."
  1806.  
  1807. The next field indicates if WED should print line numbers at the start of each
  1808. file line. This option is also useful when generating source code listings.
  1809.  
  1810.  
  1811.  
  1812. The title field can be used to print a title that will appear in the middle of
  1813. the top header line on each page. This field has no affect if "no" is selected
  1814. at the "print header" field.
  1815.  
  1816. The page height and page width settings tell WED how many rows and columns the
  1817. printer can print on each page.
  1818.  
  1819. The top and bottom margin settings specify how many lines to skip over at the
  1820. top and bottom of each page.
  1821.  
  1822. The left and right margin values determine the number of blank columns to
  1823. leave in the left and right margins on each page.
  1824.  
  1825.           +-------------------- page width --------------------+
  1826.  
  1827.       +   +----------------------------------------------------+
  1828.       :   |                        top                         |
  1829.       :   |                      margin                        |
  1830.       :   |        +-----------------------------------+       |
  1831.       :   |        |                                   |       |
  1832.       :   |        |                                   |       |
  1833.       :   |        |                                   |       |
  1834.       :   |        |                                   |       |
  1835.       :   |        |                                   |       |
  1836.       :   |        |                                   |       |
  1837.     page  |  left  |                                   | right |
  1838.    height |  marg  |              T E X T              | marg  |
  1839.       :   |        |                                   |       |
  1840.       :   |        |                                   |       |
  1841.       :   |        |                                   |       |
  1842.       :   |        |                                   |       |
  1843.       :   |        |                                   |       |
  1844.       :   |        |                                   |       |
  1845.       :   |        |                                   |       |
  1846.       :   |        |                                   |       |
  1847.       :   |        +-----------------------------------+       |
  1848.       :   |                      bottom                        |
  1849.       :   |                      margin                        |
  1850.       +   +----------------------------------------------------+
  1851. Figure 9-2
  1852.  
  1853. The printer setup string is a string of characters that will be sent to the
  1854. printer before printing a file. This string can contain any eight-bit values
  1855. needed to place the printer in the proper mode(s) for printing the file. One
  1856. use of this string might be to place the printer in a condensed mode for
  1857. printing source code listings.
  1858.  
  1859. Setup strings are made up of a series of characters and ASCII codes. ASCII
  1860. codes are represented with standard C notation, "\ddd," where the back slash
  1861.  
  1862.  
  1863.  
  1864. signals an ASCII code and is followed by the actual code in decimal base. For
  1865. example, the <Esc> character (ASCII 27) would be represented as "\27."  As in
  1866. C,a hex or binary base can be specified by prefixing the value with an "x" or
  1867. a "b."  For example, <Esc> would be entered as "\x1A" in hex.
  1868.  
  1869. The printer reset string is similar to the setup string. The only difference
  1870. is that it is sent to the printer after the file has been printed. The purpose
  1871. of this string is to reset the printer to its normal mode. For example, the
  1872. string may contain the codes to return the printer to normal density printing
  1873. after printing the file with condensed print:  "\x12"
  1874.  
  1875.  
  1876. 10   The Setup Command
  1877. The  setup  command  permits various parameters to be changed that affect  the  way  WED
  1878. operates during an edit session. This command can be used to make temporary
  1879. changes for the current edit session or can save the changes so that they will
  1880. remain in effect for future sessions.
  1881.  
  1882. There are two ways to access the Setup command. From the main menu, select
  1883. option four. If editing a file, type Alt-S and the screen will appear as shown
  1884. in figure 10-1.
  1885.  
  1886.  
  1887. ╔═════════════════════════╡ SET UP ╞═════════════════════════╗
  1888. ║   Help                        Format                       ║
  1889. ║ Miscellaneous                   auto indent       on       ║
  1890. ║   cursor type       block       word wrap         off      ║
  1891. ║   eoln symbol       «           right margin      65       ║
  1892. ║   locate key        clear       tab conversion    spaces   ║
  1893. ║   user programs                 tab stops                  ║
  1894. ║   keyboard macros             Printing                     ║
  1895. ║   split screen      split       print header      yes      ║
  1896. ║   default mode      overwrite   print line nos    yes      ║
  1897. ║   insert type       push        page height       66       ║
  1898. ║   <del> key         del char    page width        80       ║
  1899. ║ Files                           top margin        3        ║
  1900. ║   make BAK files    yes         bottom margin     3        ║
  1901. ║   file name keep    keep        left margin       10       ║
  1902. ║   swap path                     setup string               ║
  1903. ║ Video                           reset string               ║
  1904. ║   monitor type      color                                  ║
  1905. ║   colors                                                   ║
  1906. ║   ega 43 line       no                                     ║
  1907. ║   snow removal      off         save setup values          ║
  1908. ╚═══════════════════╡ <Esc> to exit Setup ╞══════════════════╝
  1909. Figure 10-1
  1910.  
  1911. To change a value use the cursor keys to move the cursor bar to the desired
  1912. field. If the field description is followed by a status word press the <space>
  1913.  
  1914.  
  1915.  
  1916. bar to toggle between the available choices. If the field description is
  1917. followed by a numerical value press the <space> bar and then enter the new
  1918. value. If there is no status or value following the field press the <space>
  1919. bar and WED will open a new window to prompt for additional information.
  1920.  
  1921. Once in the Setup menu it is possible to make as many changes as needed. When
  1922. done press the <Esc> key to exit the Setup command. To preserve the changes
  1923. that have made for future edit sessions select the last setup field "save
  1924. setup values."
  1925.  
  1926. If help is needed while using the setup command select the first setup field,
  1927. "help", and WED will display general information about the setup command. If
  1928. detailed information is desired on one of the setup fields, move the cursor
  1929. bar to that field and type Alt-H.
  1930.  
  1931. The rest of this chapter is devoted to providing detailed descriptions for
  1932. each of the setup fields.
  1933.  
  1934.  
  1935. 10.1 Cursor Type
  1936. There are two cursor shapes available to use during editing: a standard
  1937. underline cursor or an easier to see block cursor. The current cursor choice
  1938. is shown next to the "Cursor" prompt.
  1939.  
  1940.  
  1941. 10.2 End-Of-Line Symbol
  1942. WED uses a special character to indicate the location of carriage returns in a
  1943. file. The default value for this character is ASCII 174, which looks like a
  1944. pair of left facing arrows. To change this value select Setup field two and
  1945. WED will prompt for a new ASCII value. Enter a value from 32 to 255.
  1946.  
  1947.  
  1948. 10.3 Locate Key Keep
  1949. The Locate Key flag is similar to the File Name flag. When it is set to "keep"
  1950. WED remembers the most recent Locate phrase. Each time the Locate or Replace
  1951. command is executed the last search phrase will be displayed. The phrase can
  1952. be accepted, edited or a new one can be entered. The editing keys available
  1953. while entering file names are the left and right cursor keys, the home and end
  1954. keys, the plus and minus keys and the backspace key. In addition, the <Ins>
  1955. key toggles between over-write and insert modes and Ctrl-<End> key erases from
  1956. the cursor to the end of the entry.
  1957.  
  1958. If the Locate Key flag is set to "clear" it will be necessary to enter the
  1959. complete search phrase every time the Locate and Replace commands are used.
  1960.  
  1961.  
  1962. 10.4 User Programs
  1963. With the eXecute command WED provides the ability to run compilers or other
  1964. programs from within the editor. Before executing a program with this command
  1965.  
  1966.  
  1967.  
  1968. it is necessary to install it using the User Programs option of the setup
  1969. menu. Select the user programs setup field to enter or change programs. The
  1970. screen will appear as shown in figure 10-2. The eXecute command is described
  1971. in Chapter Seven.
  1972.  
  1973. ╔═════════════════════╡ USER PROGRAMS ╞════════════════════╗
  1974. ║ Prompt       Path/name                                   ║
  1975. ║ MSC 5.1      d:\msc\bin\cl                               ║
  1976. ║ LINT         c:\usr\bin\lint                             ║
  1977. ║ TASM 2.0     d:\borlandc\bin\tasm                        ║
  1978. ║ ░░░░░░░░░    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║
  1979. ║ ░░░░░░░░░    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║
  1980. ║ ░░░░░░░░░    ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║
  1981. ╚═════════════════════╡ <Esc> to exit ╞════════════════════╝
  1982. Figure 10-2
  1983.  
  1984. Use the <up> and <down> cursor keys to select one of the six program slots. To
  1985. add a new program move to the first blank line and enter the new program.
  1986. Start by entering a prompt for this program. This is the selection text that
  1987. will be displayed in the pull down menu. Next enter the path and file name of
  1988. the actual program. Finally, WED will prompt for the minimum memory required
  1989. to run the program. WED will use this number to determine if it should swap
  1990. the current edit file(s) out to make room for the program.
  1991.  
  1992. Any of the user program entries can be changed by moving to the desired line
  1993. and editing the entries.
  1994.  
  1995.  
  1996. 10.5 Keyboard Macros
  1997. The macro facility provided with WED is designed to save keystrokes and to
  1998. allow the customization of the editor to suit individual needs. A macro is a
  1999. set of up to twenty commands (keystrokes) that can be assigned to a particular
  2000. function key combination. When that key is pressed the commands in the macro
  2001. will be executed just as if they had been entered from the keyboard. Up to
  2002. forty macros can be defined using the four variations of the ten function
  2003. keys: <F1>, <Shift><F1>, <Ctrl><F1> and <Alt><F1>.
  2004.  
  2005. Select the keyboard macros setup field to enter or change keyboard macros. The
  2006. screen will appear as shown in figure 10-3.
  2007.  
  2008. ╔══════════════════════════════╡ KEYBOARD MACROS ╞═════════════════════════════╗
  2009. ║ Enter macro key to edit:                                                     ║
  2010. ║ Macro<F5>: ^O1                                                               ║
  2011. ║ Enter macro, then <F5>: ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ║
  2012. ╚═══════════════════════════════╡ <Esc> to exit ╞══════════════════════════════╝
  2013. Figure 10-3
  2014.  
  2015. Select a macro by pressing one of the forty function key combinations. For
  2016. example, to redefine the <Ctrl><F8> macro hold down the <Ctrl> key and press
  2017.  
  2018.  
  2019.  
  2020. the <F8> key.
  2021.  
  2022. WED will display the current contents of the macro on the next line and will
  2023. provide space to enter the new contents of the macro on the following line.
  2024. Enter the macro keystrokes as if typing them directly into WED during an edit
  2025. session. The <Backspace> key can be used to make corrections. When the macro
  2026. is complete press the function key combination to accept the entry. WED does
  2027. not change the original macro if an empty macro is entered.
  2028.  
  2029.  
  2030. 10.6 Split Screen
  2031. The Split screen flag controls manner in which WED displays the edit files
  2032. when using the Other File command. When Split screen is set the Other File
  2033. command "splits" the screen by drawing a horizontal line across the middle. It
  2034. then displays two of the edit files at the same time with one on the top half
  2035. and the other file on the lower half of the screen.
  2036.  
  2037. Select "zoom" to use the full screen to edit each file, or "split" to use the
  2038. split screen feature.
  2039.  
  2040.  
  2041. 10.7 Insert Type
  2042. WED supports two types of insert modes which are described in section 4.2.
  2043. Select the keyboard assignments for these two modes using the Insert Type
  2044. switch from Setup. If the Insert Type is set to "push" the push setup mode
  2045. will be assigned to the <Ins> key and the drop-down insert mode will be
  2046. assigned to Alt-I. If the Insert Type is set to "drop down" then these key
  2047. assignments will be reversed.
  2048.  
  2049. 10.8 <del> Key
  2050. With the <del> key Setup switch the <del> key can be selected to operate in
  2051. the Erase mode or delete char commands.
  2052.  
  2053.  
  2054. 10.9 Make BAK Files
  2055. When WED saves a file it normally makes a backup of the old version before
  2056. saving the newly edited version of the file. It accomplishes this by first
  2057. renaming the old file with an extension of ".BAK" and then saving the new
  2058. file. For example, if editing a file name "program.c" WED will rename the
  2059. original file to "program.bak" and then save the edited version as
  2060. "program.c."  This automatic backup feature can be disabled by changing the
  2061. "make BAK files" setting to "no."
  2062.  
  2063.  
  2064. 10.10 File Name Keep
  2065. The File Name flag is designed to save time entering file names while editing.
  2066. When File Name is set to "keep" WED remembers the last file name entered.
  2067. Every time WED prompts for a file name the last file name entered will be
  2068. displayed. This name can be edited or a new one can be entered. The editing
  2069.  
  2070.  
  2071.  
  2072. keys available while entering file names are: the left and right cursor keys,
  2073. the home and end keys, the plus and minus keys and the backspace key. In
  2074. addition, the <Ins> key toggles between overwrite and insert modes and the
  2075. Ctrl-<End> key erases from the cursor to the end of the entry.
  2076.  
  2077. If the File Name flag is set to "clear" it will be necessary to enter a
  2078. complete file name whenever executing a file command.
  2079.  
  2080.  
  2081. 10.11 Swap Path
  2082. When editing very large files WED may have to swap some of the text out to
  2083. disk because there is not enough memory to hold the entire file in RAM. WED
  2084. may also have to swap text to disk when using the eXecute command to execute
  2085. user programs or compilers. When the editor swaps out text it writes it to a
  2086. file called "WEDSWAP.TXT."   Normally, it creates this file in the default
  2087. directory, but it is possible to specify a different directory with the Swap
  2088. Path setup field. This feature can be used to improve performance by
  2089. specifying a ram-disk.
  2090.  
  2091. To change the swap path select the Swap Path setup field. WED will open a
  2092. window and prompt for the new swap path. Enter the complete path specification
  2093. (including the disk drive if different from the default).
  2094.  
  2095.  
  2096. 10.12 Monitor Type
  2097. Some computer systems combine a monochrome monitor with a color adapter card.
  2098. These systems display colors as shades a gray, a display mode which can be
  2099. hard on the eyes when performing text functions such as editing.
  2100.  
  2101. It is possible to use the color selection function to select black and white
  2102. color combinations, but WED provides an easier way. Setting the Monitor Type
  2103. setup field to "mono" automatically selects black and white color
  2104. combinations.
  2105.  
  2106.  
  2107. 10.13 Colors
  2108. It is possible to select the colors that will be used during edit sessions.
  2109. Color sets can be selected for the various window types such as edit, menus,
  2110. help, etc. For each window type select the colors for five attribute types:
  2111. background, normal, highlighted, border and field text.
  2112.  
  2113. To change colors select the "Colors" setup field and WED will display the
  2114. color selection menu. Use the <up> and <down> cursor keys to select the window
  2115. type, the <left> and <right> cursor keys to select the attribute type and the
  2116. <space> bar to step through the available colors.
  2117.  
  2118.  
  2119.  
  2120. 10.14 EGA 43 Line Mode
  2121. Most EGA video adapters support a compressed text mode with forty-three lines
  2122. on the screen. If using one of these EGA adapters, it is possible to use the
  2123. 43-line mode when editing with WED.
  2124.  
  2125. When the WED 43-line mode field is set to "yes" WED automatically switches to
  2126. the adapter to the condensed mode. When exiting WED the editor always resets
  2127. the adapter to the standard 25-line mode.
  2128.  
  2129.  
  2130. 10.15 Snow Removal
  2131. Some computers with color display systems may experience problems with video
  2132. snow while using WED. Eliminate the snow by setting the Snow Removal switch to
  2133. "yes".
  2134.  
  2135. In order to eliminate the video snow WED must wait for the monitor to perform
  2136. a vertical retrace. This means that screen output will be slower when the Snow
  2137. Removal switch is set to "yes". For this reason some users may opt to tolerate
  2138. the screen snow and  leave the Snow Removal switch set to "no" so that WED's
  2139. screen output will be as fast as possible.
  2140.  
  2141.  
  2142. 10.16 Auto Indent
  2143. The auto indent mode saves key strokes when editing programs which use
  2144. indentation. This feature only operates when the editor is in the Insert mode.
  2145.  
  2146. If auto indent is turned on and text is being entered in Insert mode WED will
  2147. automatically indent any new lines created to the same level as the previous
  2148. lines. It does this by automatically entering spaces at the beginning of the
  2149. line. To change the indentation level of the new line, use either the
  2150. backspace or space keys to reduce or increase the indentation level of the
  2151. line.
  2152.  
  2153.  
  2154. 10.17 Word Wrap
  2155. WED supports a word wrap mode for documentation and light word processing
  2156. tasks. When word wrap is on and text is entered past the right margin WED will
  2157. move the current word down to the next line. The right margin column setting
  2158. is another setup field and is described below.
  2159.  
  2160. The Format command will reflow or reformat the text within the margins. The
  2161. word wrap mode is described in detail in chapter six of this manual.
  2162.  
  2163.  
  2164. 10.18 Right Margin
  2165. The right margin setting determines the column at which WED will attempt to
  2166. word wrap the current input line. This setup field has no effect when Word
  2167. Wrap is set turned off.
  2168.  
  2169.  
  2170.  
  2171.  
  2172. 10.19 Tab Conversion
  2173. The tab character is a special character in ASCII files. When it is displayed
  2174. on the screen, as with an editor, it is displayed as a series of blanks. The
  2175. number of blanks is determined by the screen column on which the tab character
  2176. is positioned and on the current settings of the tab stops. Enough blanks will
  2177. be included to cause the next character to be displayed at the next tab stop.
  2178. In WED, the tab stops are set every eight columns starting with column one.
  2179. These settings cannot be changed.
  2180.  
  2181. Tabs are most useful for lining up columns of numbers, words or other text.
  2182. They are also handy for quickly moving the cursor out to a higher column. For
  2183. example, moving to column seventeen takes sixteen keystrokes with the space
  2184. key, but only two keystrokes with the tab key.
  2185.  
  2186. In high level languages it is often convenient to be able to move out to
  2187. desired columns using the tab key, but it is undesirable to have actual tab
  2188. characters inserted into the source file because they make it difficult to
  2189. change indentation.
  2190.  
  2191. WED provides an answer to this conflict. The Tabs flag controls the action of
  2192. the tab key in the Insert mode. When this flag is set to "tabs" the tab key
  2193. works normally and causes a tab character to be inserted into the text. When
  2194. the flag is set to "spaces" the tab key causes space characters to be inserted
  2195. instead of a tab character. Enough spaces will be inserted to move the cursor
  2196. to the next tab stop.
  2197.  
  2198.  
  2199. 10.20 Tab Stops
  2200. All registered copies of WED will be received with the tab stops set to the
  2201. default value of every eight columns. These setting can be altered with the
  2202. tab stops option on the Setup menu. Up to forty tab stops can be set in any
  2203. column up to column 78.
  2204.  
  2205. To change the tab stops select that option from the Setup menu and WED will
  2206. open a window containing a format line with a ">" at each tab stop. To add or
  2207. remove a tab stop move the cursor to the desired column and press <Tab> to add
  2208. a tab stop or <Space> to remove a tab stop. When done press <Enter> to store
  2209. the new tab settings.
  2210.  
  2211.  
  2212. 10.21 Print Header
  2213. The WED file printing utility provides an option for printing header lines on
  2214. each page of the listing. These header lines include the file name, a user
  2215. entered title, the page number and the current time and date. This option is
  2216. very useful when generating source code listings.
  2217.  
  2218. If header lines are not desired set the "print header" status to "no."
  2219.  
  2220.  
  2221.  
  2222.  
  2223. 10.22 Print Line Numbers
  2224. The WED file printing utility provides an option for printing line numbers on
  2225. each line of the listing. This option is very useful when generating source
  2226. code listings.
  2227.  
  2228. If line numbers are not desired set the "print line nos" status to "no."
  2229.  
  2230. 10.23 Printer Page Height
  2231. When using the file printing utility it is necessary to specify the total
  2232. number of lines per page. For most applications this value will be 66.
  2233.  
  2234.  
  2235. 10.24 Printer Page Width
  2236. When using the file printing utility it is necessary to specify the total
  2237. number of columns per line. For most applications this value will be 80 or
  2238. 132.
  2239.  
  2240.  
  2241. 10.25 Printer Top Margin
  2242. The top margin value specifies the number of blank lines to skip over at the
  2243. top of each page when printing files.
  2244.  
  2245.  
  2246. 10.26 Printer Bottom Margin
  2247. The bottom margin value specifies the number of blank lines to skip over at
  2248. the bottom of each page when printing files.
  2249.  
  2250.  
  2251. 10.27 Printer Left Margin
  2252. The left margin value specifies the number of columns to skip over at the
  2253. beginning of each line when printing files.
  2254.  
  2255.  
  2256. 10.28 Printer Right Margin
  2257. The right margin value specifies the number of blank to skip over at the end
  2258. of each line when printing files.
  2259.  
  2260. 10.29 Printer Setup String
  2261. The printer setup string is a string of characters that will be sent to the
  2262. printer before printing a file. This string can contain any eight-bit values
  2263. needed to place the printer in the proper mode(s) for printing the file. One
  2264. use of this string might be to place the printer in a condensed mode for
  2265. printing source code listings.
  2266.  
  2267. Setup strings are made up of a series of characters and ASCII codes. ASCII
  2268. codes are represented with standard C notation, "\ddd", where the back slash
  2269. signals an ASCII code and is followed by the actual code in decimal base. For
  2270. example, the <Esc> character (ASCII 27) would be represented as "\27."  As in
  2271.  
  2272.  
  2273.  
  2274. C, a hex or binary base can be specified by prefixing the value with an "x" or
  2275. a "b."  For example, <Esc> would be entered as "\x1A" in hex.
  2276.  
  2277. The following is an example of a complete printer setup string that places an
  2278. Epson compatible printer into condensed mode printing:  "\x0F"
  2279.  
  2280.  
  2281. 10.30 Printer Reset String
  2282. The printer reset string is similar to the setup string only it is sent to the
  2283. printer after the file has been printed. The purpose of this string is to
  2284. reset the printer to its normal mode. For example, the string may contain the
  2285. codes to return the printer to normal density printing after printing the file
  2286. with condensed print:  "\x12"
  2287.  
  2288.  
  2289. 10.31 Save Setup Values
  2290. Configuration changes made with the setup command are only retained during the
  2291. current edit session. For the changes to remain in effect for future edit
  2292. sessions they must be saved on disk. To do this select the last setup field,
  2293. "save setup values," and WED will write the current configuration to a file
  2294. called WED.CFG. This file will be placed in the same sub-directory as WED.EXE.
  2295.